#1
|
|||
|
|||
Regular expression in conditional build rule?
You can put conditional rules on build steps by selecting 'Build only if macro or expression...' and then there's options like 'is true', 'contains (x)', 'is not equal to (y)' etc.
It would be really great if you could add 'matches regexp (x)' and 'does not match regexp (y)' there! Or is there some other way to pull this off? |
#2
|
|||
|
|||
Create a project or global script function something like this:
Code:
Function MatchesRegEx(s, regex) Set e = New RegExp e.IgnoreCase = True e.Global = True e.Pattern = regex MatchesRegEx = e.Test(s) End Function 12/14/2011 10:07:24 AM: Building project step 1 - Test num... 12/14/2011 10:07:24 AM: Building project step 2 - Test str... 12/14/2011 10:07:24 AM: Step skipped |
#3
|
|||
|
|||
Awesome, thanks!
|
Tags |
condition , regexp , regular expression , rule |
|
|