在vs2010中合并两个正则表达式

时间:2022-11-02 21:45:46

I am trying to search keywords in vs2010 with regular expressions and wanted to merge two expressions into one

我试图用正则表达式在vs2010中搜索关键字,并希望将两个表达式合并为一个

Expression1: write a regular expression to get all matches starts with "global.ready_one"

Expression1:编写正则表达式以使所有匹配以“global.ready_one”开头

My solution : {<global.ready_one}

我的解决方案:{ }

Expression2: write a regular expression to get the all matches which contains ".get"

Expression2:编写一个正则表达式来获取包含“.get”的所有匹配项

My solution : {[get]}

我的解决方案:{[get]}

now i wanted to merge these two expressions and resultant expression should return the lines starts with "global.ready_one" and contains ".get"

现在我想合并这两个表达式,结果表达式应该返回以“global.ready_one”开头的行并包含“.get”

Please suggest a solution

请提出解决方案

Edit:

编辑:

Example: it should return all of the below results

示例:它应返回以下所有结果

 "global.ready_one_Manual_getSignal"
"global.ready_one_Auto_getSignal"
"global.ready_two_Manual_getSignal_Evaluation"

1 个解决方案

#1


2  

^global\.ready_.*_get.*$

This should do it for you.

这应该为你做。

#1


2  

^global\.ready_.*_get.*$

This should do it for you.

这应该为你做。