Regex to get specific value

Hi I’m currently looking to find value from a text input using uipath regex (matches) package.
Any body can help how can I get the output from the below samples

RM17.90
RM1,999.00
RM 23.90
RM 1,999,000.20

I need to get any value that start with RM .
I did try to used below pattern but got the error
^\RM?([1-9]{1}[0-9]{0,2}(,[0-9]{3})*(.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(.[0-9]{0,2})?|0(.[0-9]{0,2})?|(.[0-9]{1,2})?)RM

Thank you
Regards

1 Like

hi,
try using
(^RM([ 0-9,.]*))

1 Like

Hi Vishal,

did not detect anything…

Attched, screen captured for matches screen

Thank you

Can you send the whole text you were inserting into it as string.

@jamuri Can you specify what output you need from the above string.

Hi Vishal,

Manage to get the output by removing ^ symbol.
Thank you very much for your help Vishal

Regards

2 Likes

No problem. :slight_smile:

1 Like

last question how can i get variable length value e.g

12345
12345678
100199999000999

Regards

just covert it to string and use variablename.length

noted, thanks for your help vishal

1 Like

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