Hi UiPath,
Is there an easy way to remove nonnumeric character in a string?
let say I have the string below:
105,467.000 SGD
94,340.000 USD
I want to remove the SGD and USD
please let me know
thanks!
Hi UiPath,
Is there an easy way to remove nonnumeric character in a string?
let say I have the string below:
105,467.000 SGD
94,340.000 USD
I want to remove the SGD and USD
please let me know
thanks!
Hi,
Can you try the following expression?
System.Text.RegularExpressions.Regex.Replace(yourString,"[^.,\d]","")
Regards,
It works! thank you
How about this expression
System.Text.RegularExpressions.Regex.Replace(yourString,"[A-Z]+","").ToString
Regards
Gokul
Can you help me to improve my regex knowledge i did not understand this expression can you explain please ^ symbols use for start of string and dot is use for any charector but here how it use
Hi @Aleem_Khan ,
In .net regex, meta character inside square brackets is slight different with normal pattern.
For example, dot inside square brackets is not “any character” but just literal. Also (
is same. So it’s unnecessary to escape them in it.
Or - is special character only inside square brackets like [A-Z]
.
Hope this helps you.
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.