# Split the sentence

**URL:** <https://forum.uipath.com/t/split-the-sentence/255910>\
**Category:** Academic Alliance\
**Tags:** activities, system\
**Created:** [September 15, 2020, 5:34am UTC](https://forum.uipath.com/t/split-the-sentence/255910 "2020-09-15T05:34:26Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aarti\_Godhasara1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aarti_godhasara1/32/177522_2.png) [@Aarti\_Godhasara1](https://forum.uipath.com/u/Aarti_Godhasara1)\
**Post date:** [September 15, 2020, 5:34am UTC](https://forum.uipath.com/t/split-the-sentence/255910/1 "2020-09-15T05:34:26Z")

</div>

I want to split the whole value from it  
here is my sentence I want the break the value

1)10224 **GROSSINGER CITY TOYOTA _OOB_ BILL** \* VSC **0** $0.00 **1** ($18.11) **($18.11)**  
2)2769A **JP CHEVROLET NISSAN MERCEDES BENZ** GAP **12** $372.00 **0** $0.00 **8** ($150.27) **$221.73**

Bold think display the value separation this is for understanding purpose only ( **GROSSINGER CITY TOYOTA _OOB_ BILL** is the one value and **VSC** is other value same for **JP CHEVROLET NISSAN MERCEDES BENZ** and **GAP** )

---

<div class="post-metadata">

**Author:** ![RoboHeart](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/roboheart/32/217708_2.png) [@RoboHeart](https://forum.uipath.com/u/RoboHeart)\
**Post date:** [September 15, 2020, 5:38am UTC](https://forum.uipath.com/t/split-the-sentence/255910/2 "2020-09-15T05:38:20Z")

</div>

Thank you. 🙂

So, do you want to have these strings in separate values?..or combined in one string?

---

<div class="post-metadata">

**Author:** ![RoboHeart](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/roboheart/32/217708_2.png) [@RoboHeart](https://forum.uipath.com/u/RoboHeart)\
**Post date:** [September 15, 2020, 5:50am UTC](https://forum.uipath.com/t/split-the-sentence/255910/4 "2020-09-15T05:50:14Z")

</div>

Aaah…your are talking about the whole string.

 ![image](https://global.discourse-cdn.com/uipath/original/3X/2/0/200563d6d6ca5dcdc4e0620334b96fbd5617940d.png)

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

---

<div class="post-metadata">

**Author:** ![Aarti\_Godhasara1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aarti_godhasara1/32/177522_2.png) [@Aarti\_Godhasara1](https://forum.uipath.com/u/Aarti_Godhasara1)\
**Post date:** [September 15, 2020, 5:54am UTC](https://forum.uipath.com/t/split-the-sentence/255910/5 "2020-09-15T05:54:45Z")

</div>

NO I don’t want to split the GROSSINGER CITY TOYOTA _OOB_ BILL  
It is one value which I want

---

<div class="post-metadata">

**Author:** ![RoboHeart](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/roboheart/32/217708_2.png) [@RoboHeart](https://forum.uipath.com/u/RoboHeart)\
**Post date:** [September 15, 2020, 6:07am UTC](https://forum.uipath.com/t/split-the-sentence/255910/6 "2020-09-15T06:07:38Z")

</div>

Sorry. I missed that. So, like that…

![image](https://global.discourse-cdn.com/uipath/original/3X/9/7/978bde56c0719ef9ffa95069a1ebf775f272c8f5.png)

![image](https://global.discourse-cdn.com/uipath/original/3X/1/6/16cd479dba878b6d4a8f9127284e5a73073887ff.png)

---

<div class="post-metadata">

**Author:** ![Aarti\_Godhasara1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aarti_godhasara1/32/177522_2.png) [@Aarti\_Godhasara1](https://forum.uipath.com/u/Aarti_Godhasara1)\
**Post date:** [September 15, 2020, 6:19am UTC](https://forum.uipath.com/t/split-the-sentence/255910/7 "2020-09-15T06:19:24Z")

</div>

in Match activity which pattern you put?

---

<div class="post-metadata">

**Author:** ![RoboHeart](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/roboheart/32/217708_2.png) [@RoboHeart](https://forum.uipath.com/u/RoboHeart)\
**Post date:** [September 15, 2020, 6:21am UTC](https://forum.uipath.com/t/split-the-sentence/255910/8 "2020-09-15T06:21:14Z")

</div>

e.g. `(?<=^\w{5}\s).*(?=\s\w{3}\s\d\s\$)`

---

<div class="post-metadata">

**Author:** ![Aarti\_Godhasara1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aarti_godhasara1/32/177522_2.png) [@Aarti\_Godhasara1](https://forum.uipath.com/u/Aarti_Godhasara1)\
**Post date:** [September 15, 2020, 6:33am UTC](https://forum.uipath.com/t/split-the-sentence/255910/9 "2020-09-15T06:33:18Z")

</div>

it showing me run time error  
Matches: parsing “?\<=^\w{5}\s).\*(?=\s\w{3}\s\d\s$” - Quantifier {x,y} following nothing.

---

<div class="post-metadata">

**Author:** ![RoboHeart](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/roboheart/32/217708_2.png) [@RoboHeart](https://forum.uipath.com/u/RoboHeart)\
**Post date:** [September 15, 2020, 6:50am UTC](https://forum.uipath.com/t/split-the-sentence/255910/10 "2020-09-15T06:50:57Z")

</div>

you missed the outer parentheses…and the backshlash in front of `$`

---

<div class="post-metadata">

**Author:** ![Aarti\_Godhasara1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aarti_godhasara1/32/177522_2.png) [@Aarti\_Godhasara1](https://forum.uipath.com/u/Aarti_Godhasara1)\
**Post date:** [September 15, 2020, 6:57am UTC](https://forum.uipath.com/t/split-the-sentence/255910/11 "2020-09-15T06:57:19Z")

</div>

ya, but in result I get like CastIterator { } this

---

<div class="post-metadata">

**Author:** ![RoboHeart](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/roboheart/32/217708_2.png) [@RoboHeart](https://forum.uipath.com/u/RoboHeart)\
**Post date:** [September 15, 2020, 6:59am UTC](https://forum.uipath.com/t/split-the-sentence/255910/12 "2020-09-15T06:59:06Z")

</div>

Could you share us a screenshot for a better understanding.

---

<div class="post-metadata">

**Author:** ![RoboHeart](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/roboheart/32/217708_2.png) [@RoboHeart](https://forum.uipath.com/u/RoboHeart)\
**Post date:** [September 15, 2020, 7:05am UTC](https://forum.uipath.com/t/split-the-sentence/255910/14 "2020-09-15T07:05:33Z")

</div>

The output of “Matches” is an IEnumerable of Matches. If there is just one match expected you can use `ResultOut(0).ToString` to get the the first match.

---

<div class="post-metadata">

**Author:** ![RoboHeart](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/roboheart/32/217708_2.png) [@RoboHeart](https://forum.uipath.com/u/RoboHeart)\
**Post date:** [September 15, 2020, 7:18am UTC](https://forum.uipath.com/t/split-the-sentence/255910/16 "2020-09-15T07:18:25Z")

</div>

Hope this helps you

[aarti.xaml](https://forum.uipath.com/uploads/short-url/uRHp1zOa5GJbq9wHVR2kcfQYHSF.xaml) (5.3 KB)

---

<div class="post-metadata">

**Author:** ![Aarti\_Godhasara1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aarti_godhasara1/32/177522_2.png) [@Aarti\_Godhasara1](https://forum.uipath.com/u/Aarti_Godhasara1)\
**Post date:** [September 15, 2020, 8:16am UTC](https://forum.uipath.com/t/split-the-sentence/255910/17 "2020-09-15T08:16:53Z")

</div>

it’s not working for my scenario every time word size can be change

---

<div class="post-metadata">

**Author:** ![RoboHeart](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/roboheart/32/217708_2.png) [@RoboHeart](https://forum.uipath.com/u/RoboHeart)\
**Post date:** [September 15, 2020, 8:27am UTC](https://forum.uipath.com/t/split-the-sentence/255910/18 "2020-09-15T08:27:34Z")

</div>

In that case you actually just have to adapt the regex pattern to your needs.  
You have to estimate the variation of that data and must consider this variation in your pattern.

---

<div class="post-metadata">

**Author:** ![desineediaditya](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/desineediaditya/32/173183_2.png) [@desineediaditya](https://forum.uipath.com/u/desineediaditya)\
**Post date:** [September 15, 2020, 10:20am UTC](https://forum.uipath.com/t/split-the-sentence/255910/19 "2020-09-15T10:20:58Z")

</div>

Hi @Aarti_Godhasara1  
will this value be constant?

Regards,  
Aditya

---

<div class="post-metadata">

**Author:** ![Mats\_Olsson](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@Mats\_Olsson](https://forum.uipath.com/u/Mats_Olsson)\
**Post date:** [September 16, 2020, 6:36am UTC](https://forum.uipath.com/t/split-the-sentence/255910/20 "2020-09-16T06:36:18Z")

</div>

You need to find something to identify the different parts you want extracted.  
Looking at your examples:

1)10224 **GROSSINGER CITY TOYOTA _OOB_ BILL** \* VSC **0** $0.00 **1** ($18.11) **($18.11)**  
2)2769A **JP CHEVROLET NISSAN MERCEDES BENZ** GAP **12** $372.00 **0** $0.00 **8** ($150.27) **$221.73**

1. I’m assuming “1)” and “2)” are only to highlight the different lines.  
If so, it appears the name you want extracted starts after the first space in the string. (Remove everything before the first space.)

2. Are “VSC” and “GAP” constants? If so, check for the constants and remove all non-alphanumeric characters before it (the “\*” in the first example). You should have the name remaining.

3. Break the string remaining after the constants “VSC” or “GAP” and break on space, as cKsB suggested. ([https://forum.uipath.com/t/split-the-sentence/255910/4](https://forum.uipath.com/t/split-the-sentence/255910/4))  
Position 0, 1 and 3 should contain the values you are looking for.

---

<div class="post-metadata">

**Author:** ![Aarti\_Godhasara1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aarti_godhasara1/32/177522_2.png) [@Aarti\_Godhasara1](https://forum.uipath.com/u/Aarti_Godhasara1)\
**Post date:** [September 17, 2020, 5:29am UTC](https://forum.uipath.com/t/split-the-sentence/255910/21 "2020-09-17T05:29:01Z")

</div>

I want to delete my post please delete my post
