How to get String pattern of text file

Hi All,

We have some string below as example:

Your Purchase Order: .
01.01.2020 - 31.12.2020 our order no. 13812767
10.000% of 1.82700 USD for 12 months 182.70 USD
Total net value — —__ _ ’ ’ 182.70 USD
Commercial Tax 5.000 % of 182.70 USD 9.14 USD

What we want to do is only to extract this data (01.01.2020 - 31.12.2020) with this pattern " . . - . . " since value are not the same for every documents. We tried used Matches activity but still missing something.
So can someone know how can we achieve that value in UiPath?

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(text,"\d+\.\d+\.\d+\s*-\s*\d+\.\d+\.\d+").Value

Regards,

@Htwe_Ko_Ko_Wynn What regex expression had you used ?
Was it this expression in the below link :sweat_smile:

Use this below code, @Htwe_Ko_Ko_Wynn
System.Text.RegularExpressions.Regex.Match( InputStr,".*-\s[0-9.]+")

Hi All,
Now i got the solution thanks for everyone.

System.Text.RegularExpressions.Regex.Match( text,"\d+.\d+.\d+\s*-\s*\d+.\d+.\d+").ToString

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