Metacracters - sub-expression in Automise

Hi,

I am trying to use Metacharacters - subexpressions from Automise.

From a file, I read a line - "Product Build Number: 12345"

My Regular expression = ^.*Build.*(\d)+$

How can I extract the string/integer - 12345 and assign to a variable in my automise project? Any pointers would be of great help.

 

Thanks,

-Ravi

 

Hi Ravi,

You'll need to use the "Text Find / Replace" action with the parameters set as followed:

Search String: ^.*Build.*(\b\d+\b)$
Match as Regular Expression: Checked
Replace Text and write back to variable: Checked
Replacement String: $1
Substitute regular expression matches: Checked

Hope that helps :)