繁体   English   中英

在vb.net中使用Regex在字符串中查找字符串

[英]Find string within string using Regex in vb.net

我有以下字符串。

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

现在,我想使用正则表达式查找类似"USP"字符串。 谁能告诉我正则表达式找出这个字符串。

提前致谢。

应该这样做:

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

有效的意思是:在ExecuteSPReader(" ,查找不是_连续字符

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM