Good day,
can I please get help with extracting numerics only from this value:
AIRTEC 15088214"
12302494.Polland HDO Aup fps"
ABS LABS 5492603 Hefa"
Basically to just extract the digits from alphanumerics
Good day,
can I please get help with extracting numerics only from this value:
AIRTEC 15088214"
12302494.Polland HDO Aup fps"
ABS LABS 5492603 Hefa"
Basically to just extract the digits from alphanumerics
You can use ![]()
String.Join(ββ, System.Text.RegularExpressions.Regex.Matches(inputString, β\d+β).Cast(Of System.Text.RegularExpressions.Match).Select(Function(m) m.Value))
Output:
AIRTEC 15088214 β 1508821412302494.Polland HDO Aup fps β 12302494ABS LABS 5492603 Hefa β 5492603If your data is getting eaither one of you mentioned.
then you can follow below steps,
this will extract the only numbers from above any of the text
Happy Automation
Hello,@Anelisa_Bolosha1
Are you familiar with Regular Expressions (Regex)?
String extraction tasks like this can be easily solved using Regex.
Even if you donβt know the exact syntax, you can simply ask a generative AI to generate it for you.
For example, if you input a prompt like this into a generative AI:
"I have a question about UiPath.
Could you please tell me the regular expression to extract only the numbers from the following?
AIRTEC 15088214"
12302494.Polland HDO Aup fps"
ABS LABS 5492603 Hefa""
It will provide you with the solution, such as:
OutputString = System.Text.RegularExpressions.Regex.Replace(inputString, "\D", "")
After that, all you need to do is paste this expression into an Assign activity.
If this answer helps you, please mark it as the Solution.
You can use below RE as per your scenario:
Extract only the numeric characters from the text
System.Text.RegularExpressions.Regex.Match(inputString, "\d+").Value
Examples: 12302494.Polland HDO Aup fps β 12302494
System.Text.RegularExpressions.Regex.Replace(inputString, "[^\d]", "")
Examples: 12302494.Polla123nd HDO Aup fps β 12302494123
If it works please mark it as a solution!
Hello @gorby ,
Yes I am thank you
This did the trick thank you so much @prashant1603765 . It worked well ![]()