2

I'm new to using RegEx and I'm not sure what objRegEx.Pattern = """([^""]+)""" does I'm using a reference script which uses this on the text

Profiles on interface Wireless Network Connection:

Group policy profiles (read only)
---------------------------------
    <None>

User profiles
-------------
    All User Profile     : x

where x is the name of a wifi network; using MsgBox it gives "Wireless Network Connection" and x both in quotes

Prokash Sarkar
  • 10,714
  • 1
  • 30
  • 47
Seinu
  • 17
  • 1

1 Answers1

1

Use

https://regex101.com/

To get an excellent explanation on your expressions. Here you can test them, too:

()     capture everything in a Group that occures
+      between one an unlimited times and contains of
[^"]   anything but "

The enslosing quotes are a formating condition. Usually the content of the capturing Group is later read by referencing it (e.g. by $1 or \1) - like it is done in your example with the MsgBox: Here the regex was used to parse the Input, get the value of the Wifi-String stored in a Group an then echo it.

Benvorth
  • 6,363
  • 7
  • 40
  • 64