Split the sentence

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 )

Thank you. :slight_smile:

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

Aaah…your are talking about the whole string.

image

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

Sorry. I missed that. So, like that…

image

image

in Match activity which pattern you put?

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

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

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

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

Could you share us a screenshot for a better understanding.

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.

Hope this helps you

aarti.xaml (5.3 KB)

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

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.

Hi @Aarti_Godhasara1
will this value be constant?

Regards,
Aditya

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)
    Position 0, 1 and 3 should contain the values you are looking for.

I want to delete my post please delete my post