# Extract Partial String

**URL:** <https://forum.uipath.com/t/extract-partial-string/168966>\
**Category:** Help\
**Tags:** data-manipulation, question, system, activities\
**Created:** [November 18, 2019, 9:19am UTC](https://forum.uipath.com/t/extract-partial-string/168966 "2019-11-18T09:19:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammedamaan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mohammedamaan/32/53965_2.png) [@mohammedamaan](https://forum.uipath.com/u/mohammedamaan)\
**Post date:** [November 18, 2019, 9:19am UTC](https://forum.uipath.com/t/extract-partial-string/168966/1 "2019-11-18T09:19:36Z")

</div>

Hi,

I have a string and I want to extract part of it. For eg if my string is **104701123456001**.I want to extract the string between 5th and last 3 characters. Hence my output should be **01123456**

Can someone please help. Sorry I am bad at programming.

---

<div class="post-metadata">

**Author:** ![sarathi125](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sarathi125/32/519448_2.png) [@sarathi125](https://forum.uipath.com/u/sarathi125)\
**Post date:** [November 18, 2019, 9:26am UTC](https://forum.uipath.com/t/extract-partial-string/168966/2 "2019-11-18T09:26:03Z")

</div>

@mohammedamaan,

Try like this,

```auto
str.Substring(4,8)

```

---

<div class="post-metadata">

**Author:** ![monika.c](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/monika.c/32/176728_2.png) [@monika.c](https://forum.uipath.com/u/monika.c)\
**Post date:** [November 18, 2019, 9:26am UTC](https://forum.uipath.com/t/extract-partial-string/168966/3 "2019-11-18T09:26:21Z")

</div>

@mohammedamaan  
Str= **104701123456001**  
OpStr=Str.Substring(4,8)

---

<div class="post-metadata">

**Author:** ![Ajju](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ajju/32/21682_2.png) [@Ajju](https://forum.uipath.com/u/Ajju)\
**Post date:** [November 18, 2019, 9:33am UTC](https://forum.uipath.com/t/extract-partial-string/168966/4 "2019-11-18T09:33:14Z")

</div>

hi @mohammedamaan

if the index are constant means staring from 5th and till last but 3rd character then use the below expression,

`result = InputString.Substring(4,InputString.Length-3-4)`

 ![image](https://global.discourse-cdn.com/uipath/original/3X/c/d/cdb1e71427cd0add3208c4724fd362b6a6184bcb.png)

Regards  
Ajay

---

<div class="post-metadata">

**Author:** ![mohammedamaan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mohammedamaan/32/53965_2.png) [@mohammedamaan](https://forum.uipath.com/u/mohammedamaan)\
**Post date:** [November 18, 2019, 9:36am UTC](https://forum.uipath.com/t/extract-partial-string/168966/5 "2019-11-18T09:36:15Z")

</div>

Thanks. It worked.

---

<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:** [November 21, 2019, 9:36am UTC](https://forum.uipath.com/t/extract-partial-string/168966/6 "2019-11-21T09:36:15Z")

</div>

Closed on November 21, 2019, 9:36am UTC

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