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 )
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.
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.
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
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.)
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.
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.