# Extract string from output

**URL:** <https://forum.uipath.com/t/extract-string-from-output/746614>\
**Category:** Studio\
**Tags:** activities-panel, question, studio, system, activities\
**Created:** [June 10, 2024, 10:07am UTC](https://forum.uipath.com/t/extract-string-from-output/746614 "2024-06-10T10:07:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shruthi\_arali](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shruthi_arali/32/56033_2.png) [@shruthi\_arali](https://forum.uipath.com/u/shruthi_arali)\
**Post date:** [June 10, 2024, 10:07am UTC](https://forum.uipath.com/t/extract-string-from-output/746614/1 "2024-06-10T10:07:50Z")

</div>

Hi I want to extract “RITM0416320” from “RITM0416320Sales invoiceProject”.  
I have saved this in variable.  
This extracted number is dynamic and always changes.

Please help

---

<div class="post-metadata">

**Author:** ![Parvathy](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/parvathy/32/484539_2.png) [@Parvathy](https://forum.uipath.com/u/Parvathy)\
**Post date:** [June 10, 2024, 10:09am UTC](https://forum.uipath.com/t/extract-string-from-output/746614/2 "2024-06-10T10:09:43Z")

</div>

Hi @shruthi_arali

`[A-Z]+[0-9]+`

 ![image](https://global.discourse-cdn.com/uipath/original/4X/5/6/3/563e777133d90a979e240dcf6b64260146f48c52.png)

Regards

---

<div class="post-metadata">

**Author:** ![lchirathapudi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lchirathapudi/32/483782_2.png) [@lchirathapudi](https://forum.uipath.com/u/lchirathapudi)\
**Post date:** [June 10, 2024, 10:10am UTC](https://forum.uipath.com/t/extract-string-from-output/746614/3 "2024-06-10T10:10:01Z")

</div>

Hi @shruthi_arali

```auto
[A-Z]+\d+

```

 ![image](https://global.discourse-cdn.com/uipath/original/4X/a/7/1/a71ca58d593c6451caba31d5793d1234d977d922.png)

Regards,

---

<div class="post-metadata">

**Author:** ![lchirathapudi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/lchirathapudi/32/483782_2.png) [@lchirathapudi](https://forum.uipath.com/u/lchirathapudi)\
**Post date:** [June 10, 2024, 10:12am UTC](https://forum.uipath.com/t/extract-string-from-output/746614/4 "2024-06-10T10:12:07Z")

</div>

@shruthi_arali

```auto
System.Text.RegularExpressions.Regex.Match(Input,"[A-Z]+\d+").Value

```

 ![image](https://global.discourse-cdn.com/uipath/original/4X/c/5/a/c5aa1b289eb08226747a92f4e8f7e171fec94464.png)

Regards,

---

<div class="post-metadata">

**Author:** ![Parvathy](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/parvathy/32/484539_2.png) [@Parvathy](https://forum.uipath.com/u/Parvathy)\
**Post date:** [June 10, 2024, 10:12am UTC](https://forum.uipath.com/t/extract-string-from-output/746614/5 "2024-06-10T10:12:33Z")

</div>

Hi @shruthi_arali

Check the below workflow:  
`Input = "RITM0416320Sales invoiceProject"`

`Output = System.Text.RegularExpressions.Regex.Match(Input,"[A-Z]+[0-9]+").Value.Trim()`

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

Regards

---

<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 13, 2024, 10:12am UTC](https://forum.uipath.com/t/extract-string-from-output/746614/6 "2024-06-13T10:12:34Z")

</div>

Closed on June 13, 2024, 10:12am UTC

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