# Help : Regular Expression

**URL:** <https://forum.uipath.com/t/help-regular-expression/716173>\
**Category:** Studio\
**Tags:** activities-panel, question, studio\
**Created:** [January 31, 2024, 4:52am UTC](https://forum.uipath.com/t/help-regular-expression/716173 "2024-01-31T04:52:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinit\_Mhatre](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vinit_mhatre/32/517102_2.png) [@Vinit\_Mhatre](https://forum.uipath.com/u/Vinit_Mhatre)\
**Post date:** [January 31, 2024, 4:52am UTC](https://forum.uipath.com/t/help-regular-expression/716173/1 "2024-01-31T04:52:52Z")

</div>

Hi ,

Can anyone of you provide me the regex to extract data for following string?

```auto
Dear Team,
Below are the sales details for Aug’23.
Sales for 24.08.2023.
CB Business
Description
For Today 
 For the month 
 YTD Last day 
Turnover (Cr) 
 0.41 
 31.75 
 31.34 
Volume (MT) 
 64.38 
 1,595.330 
 1,530.95
Regards,
XYZ

```

Expected output:

```auto
Description
For Today 
 For the month 
 YTD Last day 
Turnover (Cr) 
 0.41 
 31.75 
 31.34 
Volume (MT) 
 64.38 
 1,595.330 
 1,530.95

```

Thanks,  
Vinit Mhatre

---

<div class="post-metadata">

**Author:** ![mkankatala](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mkankatala/32/484097_2.png) [@mkankatala](https://forum.uipath.com/u/mkankatala)\
**Post date:** [January 31, 2024, 4:54am UTC](https://forum.uipath.com/t/help-regular-expression/716173/2 "2024-01-31T04:54:38Z")

</div>

Hi @Vinit_Mhatre

Check the below regular expression -

```auto
Store the Input data in a String variable called Input

- Assign -> Output = System.Text.RegularExpressions.Regex.Match(Input,"Description[\s\S]+(?=Regards)").Value

```

 ![image](https://global.discourse-cdn.com/uipath/original/4X/e/c/1/ec1cc600932afdda393c5bb5cc3cb068c9a8a461.png)

Check the below workflow -

Hope it helps!!

---

<div class="post-metadata">

**Author:** ![Vinit\_Mhatre](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vinit_mhatre/32/517102_2.png) [@Vinit\_Mhatre](https://forum.uipath.com/u/Vinit_Mhatre)\
**Post date:** [January 31, 2024, 4:56am UTC](https://forum.uipath.com/t/help-regular-expression/716173/3 "2024-01-31T04:56:08Z")

</div>

Actually, I don’t want to extract the data based on the second phrase, which is “Regards”; I want to take the data after the description until the last number, after which the data will be dynamic.

---

<div class="post-metadata">

**Author:** ![mkankatala](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mkankatala/32/484097_2.png) [@mkankatala](https://forum.uipath.com/u/mkankatala)\
**Post date:** [January 31, 2024, 4:58am UTC](https://forum.uipath.com/t/help-regular-expression/716173/4 "2024-01-31T04:58:03Z")

</div>

Okay @Vinit_Mhatre

Then check the below,

```auto
Store the Input data in a String variable called Input

- Assign -> Output = System.Text.RegularExpressions.Regex.Match(Input,"Description[\s\S]+\d+").Value

```

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

Hope it helps!!

---

<div class="post-metadata">

**Author:** ![Vinit\_Mhatre](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vinit_mhatre/32/517102_2.png) [@Vinit\_Mhatre](https://forum.uipath.com/u/Vinit_Mhatre)\
**Post date:** [January 31, 2024, 5:00am UTC](https://forum.uipath.com/t/help-regular-expression/716173/5 "2024-01-31T05:00:30Z")

</div>

> [@mkankatala](#):
>
> `Description[\s\S]+\d+`

Thanks for your help

---

<div class="post-metadata">

**Author:** ![mkankatala](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mkankatala/32/484097_2.png) [@mkankatala](https://forum.uipath.com/u/mkankatala)\
**Post date:** [January 31, 2024, 5:01am UTC](https://forum.uipath.com/t/help-regular-expression/716173/6 "2024-01-31T05:01:01Z")

</div>

It’s my pleasure… @Vinit_Mhatre

Happy Automation!!

---

<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:** [February 3, 2024, 5:01am UTC](https://forum.uipath.com/t/help-regular-expression/716173/7 "2024-02-03T05:01:21Z")

</div>

Closed on February 3, 2024, 5:01am UTC

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