How do use RegEx Matches and Replace

Hi All

Need your advice. I am trying to extract data from email.

Gross Salary (A) 8000

How do I use RegEx (Match and replace) to obtain 8000?

1 Like

Welcome to the forum

find starter help here:
Demo_Replace_Activity-Api.xaml (5.8 KB)

for a replace it is mandatory to specify the replace value, so I implemented with empty string for demo purpose.

Retrieving the value we would use the Match Activity or the Api as below

Ensure following:

And have a look here as well:


hi @afinity_lim

Welcome to Community .You can use below regex to capture the amount .


(?<=Gross Salary \WA\W )\d*(?=\s)

This regex will help to find Gross Salary (A) first and then after matching the test it will fetch next integers value i.e 8000 in above example after Gross Salary (A).

please find below xaml file for same .
Main.xaml (5.1 KB)

Hope this help your problem statement .

1 Like

Hi @afinity_lim

Just have a look to the below regex :-

Output :-

Group1 is your output

Mark as solution and like it if this helps you :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:


Hi All

Thanks for your advice and guidance…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.