# Regex NUMERICICALS

**URL:** <https://forum.uipath.com/t/regex-numericicals/5753012>\
**Category:** Activities\
**Tags:** activities-panel, studio, system, activities\
**Created:** [June 11, 2026, 3:07pm UTC](https://forum.uipath.com/t/regex-numericicals/5753012 "2026-06-11T15:07:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anelisa\_Bolosha1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anelisa_bolosha1/32/496797_2.png) [@Anelisa\_Bolosha1](https://forum.uipath.com/u/Anelisa_Bolosha1)\
**Post date:** [June 11, 2026, 3:07pm UTC](https://forum.uipath.com/t/regex-numericicals/5753012/1 "2026-06-11T15:07:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![prashant1603765](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prashant1603765/32/523412_2.png) [@prashant1603765](https://forum.uipath.com/u/prashant1603765)\
**Post date:** [June 11, 2026, 3:17pm UTC](https://forum.uipath.com/t/regex-numericicals/5753012/2 "2026-06-11T15:17:18Z")

</div>

Hi @Anelisa_Bolosha1

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` → `15088214`
- `12302494.Polland HDO Aup fps` → `12302494`
- `ABS LABS 5492603 Hefa` → `5492603`

---

<div class="post-metadata">

**Author:** ![yedukondaluaregala](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yedukondaluaregala/32/557780_2.png) [@yedukondaluaregala](https://forum.uipath.com/u/yedukondaluaregala)\
**Post date:** [June 12, 2026, 5:46am UTC](https://forum.uipath.com/t/regex-numericicals/5753012/3 "2026-06-12T05:46:15Z")

</div>

@Anelisa_Bolosha1

If your data is getting eaither one of you mentioned.

then you can follow below steps,

- Take a assing activity, create a string variable called strNumbers in To section
- Enter the below expression in value section of assign activity,  
System.Text.RegularExpressions.Regex.Match(strValue,“[0-9]+”).ToString

this will extract the only numbers from above any of the text

 ![image](https://global.discourse-cdn.com/uipath/original/4X/9/9/5/995fa50b61d982301f3ae0d2d4272c36796ad4c1.png)

Happy Automation

---

<div class="post-metadata">

**Author:** ![gorby](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gorby/32/543563_2.png) [@gorby](https://forum.uipath.com/u/gorby)\
**Post date:** [June 12, 2026, 5:58am UTC](https://forum.uipath.com/t/regex-numericicals/5753012/4 "2026-06-12T05:58:59Z")

</div>

Hello,@**[Anelisa\_Bolosha1](https://forum.uipath.com/u/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**.

---

<div class="post-metadata">

**Author:** ![kkapula4](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kkapula4/32/523329_2.png) [@kkapula4](https://forum.uipath.com/u/kkapula4)\
**Post date:** [June 12, 2026, 6:31am UTC](https://forum.uipath.com/t/regex-numericicals/5753012/5 "2026-06-12T06:31:22Z")

</div>

Hi @Anelisa_Bolosha1

You can use below RE as per your scenario:

1. Extract only the numeric characters from the text

Examples: **12302494.Polland HDO Aup fps → 12302494**

 ![image](https://global.discourse-cdn.com/uipath/original/4X/8/8/e/88e333e9f5955b56394901ac1e16fd52f0fe867e.png)

1. If the string may contain multiple numeric groups and you want all digits combined, use:

`System.Text.RegularExpressions.Regex.Replace(inputString, "[^\d]", "")`  
Examples: **12302494.Polla123nd HDO Aup fps → 12302494123**

 ![image](https://global.discourse-cdn.com/uipath/original/4X/a/0/2/a027b3a948cc4aeb72381b21f4aa802bb952e1c9.png)

If it works please mark it as a solution!

---

<div class="post-metadata">

**Author:** ![Anelisa\_Bolosha1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anelisa_bolosha1/32/496797_2.png) [@Anelisa\_Bolosha1](https://forum.uipath.com/u/Anelisa_Bolosha1)\
**Post date:** [June 15, 2026, 11:51am UTC](https://forum.uipath.com/t/regex-numericicals/5753012/6 "2026-06-15T11:51:15Z")

</div>

Hello @gorby ,  
Yes I am thank you

---

<div class="post-metadata">

**Author:** ![Anelisa\_Bolosha1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anelisa_bolosha1/32/496797_2.png) [@Anelisa\_Bolosha1](https://forum.uipath.com/u/Anelisa_Bolosha1)\
**Post date:** [June 15, 2026, 11:55am UTC](https://forum.uipath.com/t/regex-numericicals/5753012/7 "2026-06-15T11:55:02Z")

</div>

This did the trick thank you so much @prashant1603765 . It worked well 🙂

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [June 18, 2026, 11:55am UTC](https://forum.uipath.com/t/regex-numericicals/5753012/8 "2026-06-18T11:55:05Z")

</div>

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