Hi,
I would like to remove the characters before the number
Eg: Room Ter 48 Murray st, Marrickville nsw 2004
Expected ouput: 48 Murray st, Marrickville nsw 2004
The address changes for each iteration but i only want the address from a number anything before the number i wish to remove. Can you help me with this.
Thanks.
Hi @RACHEL_PAUL
The following RegEx pattern gets you any data before the occurrence of 48
on the above example:
^.*?(?=\d)
You can use the same to replace the captured data will “” value, so that you will get the desired result.
UiPath Syntax:
System.Text.RegularExpressions.Regex.Replace(address, "^.*?(?=\d)", "")
Output:
Hope this helps,
Best Regards.
Anil_G
(Anil Gorthi)
May 25, 2023, 5:20am
3
@RACHEL_PAUL
Another way
System.Text.RegularExpressions.Regex.Match(str,"\d.*").value
cheers
mkankatala
(Mahesh Kankatala)
May 25, 2023, 5:58am
5
Hi @RACHEL_PAUL
You can use the Regex expressions to get the expected output.
System.Text.RegularExpressions.Regex.Matches(yourstringinput.ToString,“(\d+\s\w*\s*\w*,\s\w*\s\w*\s\d*)”)
Hope it helps!!