2015-08-08 23 views
2

我是新来使用正则表达式,我不知道什么objRegEx.Pattern = """([^""]+)"""做我使用它使用此上的文字的VBScript正则表达式表达的意思

Profiles on interface Wireless Network Connection: 

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

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

其中X是名称的参考脚本无线网络的;使用MSGBOX它给两个引号

回答

1

使用

https://regex101.com/ 

“无线网络连接”和X要得到你的表情一个很好的解释。在这里,您也可以对其进行测试:

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

封锁报价是一种格式化条件。通常,捕获组的内容稍后会通过引用来读取(例如,通过$ 1或\ 1) - 就像在您的示例中使用MsgBox所做的那样:此处,正则表达式用于解析输入,获取Wifi-存储在组中的字符串然后回显它。