Get Data before special character

Hi,

I need a help to get data before special character plus symbol as below(+).
Example as below

Input

01/04 CMS - CR PYMT MARS 529.10+ 992,157.39
11/04 INTER-BANK PAYMENT INTO A/C 14,911.00+ 230,045.24
07/04 TRANSFER TO A/C 199.00+ 944,643.78
08/04 INTER-BANK PAYMENT INTO A/C 3,240.00+ 169,844.34

Output require

529.10
14,911.00
199.00
3,240.00

Thank you
Jamuri

Main.xaml (8.2 KB)

assume txt = input text

  1. assign this code to matchCollection variable
    system.Text.RegularExpressions.Regex.Matches(txt, "([\d\.]+?)\+")
    image

  2. now you can loop over matchcollection (TypeArgumnet = Match)

result
image

1 Like

Hi,

FYI, another solution

Sample20220514-1.zip (2.4 KB)

Regards,

1 Like

Thank you Jack.Chan and Yoichi,

Manage to get the output.

Regards

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