# Split String to obtain a substring

**URL:** <https://forum.uipath.com/t/split-string-to-obtain-a-substring/298378>\
**Category:** Activities\
**Tags:** string, data-scraping, question, system, activities\
**Created:** [March 15, 2021, 6:52pm UTC](https://forum.uipath.com/t/split-string-to-obtain-a-substring/298378 "2021-03-15T18:52:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shekhawat.arjun1307](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shekhawat.arjun1307/32/193135_2.png) [@shekhawat.arjun1307](https://forum.uipath.com/u/shekhawat.arjun1307)\
**Post date:** [March 15, 2021, 6:52pm UTC](https://forum.uipath.com/t/split-string-to-obtain-a-substring/298378/1 "2021-03-15T18:52:53Z")

</div>

Hi All,

I scraped a string from web which is of this format -  
ab01\idfrr5707 - [abcde.wertg@company-corporation.com](mailto:abcde.wertg@company-corporation.com)

And i just want this - [abcde.wertg@company-corporation.com](mailto:abcde.wertg@company-corporation.com)

How can i split the string to obtain this part only

Thanks

---

<div class="post-metadata">

**Author:** ![prasath17](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prasath17/32/182331_2.png) [@prasath17](https://forum.uipath.com/u/prasath17)\
**Post date:** [March 15, 2021, 7:08pm UTC](https://forum.uipath.com/t/split-string-to-obtain-a-substring/298378/2 "2021-03-15T19:08:10Z")

</div>

@shekhawat.arjun1307 - Please try like this…

“ab01\idfrr5707 - [abcde.wertg@company-corporation.com](mailto:abcde.wertg@company-corporation.com)”.Split(" "c).Reverse()(0).ToString.Trim

`YourStringVar.Split(" "c).Reverse()(0).ToString.Trim`

Output:  
 ![image](https://global.discourse-cdn.com/uipath/original/3X/7/0/7019dcb6fc8d3249877a1d314e9e3ac363d67750.png)

---

<div class="post-metadata">

**Author:** ![shekhawat.arjun1307](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shekhawat.arjun1307/32/193135_2.png) [@shekhawat.arjun1307](https://forum.uipath.com/u/shekhawat.arjun1307)\
**Post date:** [March 16, 2021, 5:17am UTC](https://forum.uipath.com/t/split-string-to-obtain-a-substring/298378/3 "2021-03-16T05:17:32Z")

</div>

Hi @prasath17

Even the below expression is giving the require result, may i know why you added trim in here

“ab01\idfrr5707 - [abcde.wertg@company-corporation.com](mailto:abcde.wertg@company-corporation.com)”.Split(" "c).Reverse()(0)

---

<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:** [March 19, 2021, 5:18am UTC](https://forum.uipath.com/t/split-string-to-obtain-a-substring/298378/4 "2021-03-19T05:18:02Z")

</div>

Closed on March 19, 2021, 5:18am UTC

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