2015-03-13 86 views
0

我有以下字符串。使用正则表达式在vb.net中查找字符串中的字符串

dim str= 
"tblIDs = ExecuteSPReader("USP_testSP", GENRL.MakeArrayList("ID", "2", "TypeID", 30))" 

现在我想找到像"USP"使用正则表达式的字符串。任何人都可以告诉我正则表达式来找出这个字符串。

在此先感谢。

+1

'@ “(<= ExecuteSPReader \(?” “)[^”” ] *“' – 2015-03-13 10:31:24

+0

值得期待在这个链接。http://stackoverflow.com/questions/7369543/using-vb-net-and-regex-to-find-string-inside-nested-string – 2015-03-13 10:51:53

+0

如果你会粘贴在更多的例子中,我们可以改进模式 – 2015-03-13 11:03:05

回答

0

这应做到:

Dim result As String = Regex.Match(str,"(?<=ExecuteSPReader\("")[^_]+").Value 

用途不同意味着:向后看ExecuteSPReader(",发现连续字符不是_

相关问题