Hi,
Can you please help me in getting the amount value with the currency from the below text using regex?
"The total, not to be exceeded, Charge for the period of the term is: £ 341,072 GBP "
The currency symbol will change and does not remain the same. I only need the value that is in bold
1 Like
mc00476004:
does n
so everytime currency Symbol and Amount you need in bold
1 Like
Hi,
No, I need to extract the amount along with the currency symbol in another variable using regex.
1 Like
First, you match the currency Symbol and match the digit group
then you can add both the Variables
1 Like
Umm, will not be able to do it like that, as the string that i have extracted from PDF has many places with digits and currency, I need to extract it with the reference as “is:” so I can get the value after it.
is: and GBP remains same??
Hi, only “is:” remains the same and it can be anything after the required value.
okay
(?<=is:).*\d+
you can test it here regex101: build, test, and debug regex
1 Like
[quote=“mc00476004, post:1, topic:187223”]
£ 341,072 GBP
[/quote]hi
If the input is in string variable named strinput
Then in assign activity to get the value we need
stroutput = System.Text.RegularExpressions.Regex.Match(strinput.ToString,”[^\W].+(?=[A-Z].)”).ToString.Trim
Cheers @mc00476004
2 Likes
Yoichi
(Yoichi)
January 22, 2020, 2:06pm
12
Hi,
Hope the following helps you.
System.Text.RegularExpressions.Regex.Match(strData,"\p{Sc}\s*[,\d]+").Value
Regards,
2 Likes
Thank you @Yoichi @Palaniyappan @Pradeep_Shiv .
I was able to use your inputs and find out the correct solution for this
2 Likes
Cool
Happy Learning @mc00476004
1 Like