How to use regex in RPA Express

Dear Team,
I am trying to extract particular data from notepad. Sample data is below

Example Amount :23456

I want to take data in front of **Amount:

Please help me how I can extract this data…

@amol_sonavane

This is the regex you are looking for

Regex: Amount+(\s|:|\s)+\d{1,}

which will match the exact string and then you can do string operation by split(":") using colon and then trim the array of index value of 1 and therefore you will get the value of amount.

Sample Screenshot below

Have a great Day! :slight_smile:

2 Likes

@amol_sonavane I think, you can use the Substring between action in this case.

Dear Ashapkina,

every time word is different after amount or :

for substring we need fix word before and after.

Can u plz give me solution

@amol_sonavane do you need to extract the numbers after : ?

Could you share the samples of text that you have in the notepad (the whole text) and the final text that you need to extract.

Hi ashpkina,

please find attached sample text file. I need to extract Data infront of “Chassis” keyword

sample data:

Chassis PG3716510313 EX4300-24T

here I want to extract word "PG3716510313 " and “EX4300-24T” in diff. variables.

Note: Every time word in front of Chassis is different.

Please find attached notepad filetest-1.txt (3.5 KB)

1 Like

@amol_sonavane
I tried this script with the file you shared, and it worked.
data-extraction.zip (710 Bytes)

Hope it helps.
Let me know if it doesn’t work for you.

Dear Ashapkina,

can you please share screenshot of variable part…

What do you mean by the variable part? The variables used in the script?

image