How to split string variable

how can I divide a string like this after the money symbol and before space

Support is requested for tickets (suburban and taxis) in the state of Chiapas for an amount
of $ 600.00. for each auditor

the exit would be this

600

1 Like

@Ivan_torres_oliva

first split by "$ " – store its 1st index in variable
then split by β€œ.” β€” store its 0th index in variable

here’s sample for reference
image

1 Like

Hi,

If you want to extract only the value (like 600), the following expression might help you.

System.Text.RegularExpressions.Regex.Match(yourStrData,"(?<=\$\s*)\d+").Value

Regards,

1 Like

Hi @Ivan_torres_oliva

You can read this article below for your reference.

cheers :smiley:

Happy learning :smiley:

1 Like

Split.xaml (4.5 KB)

I have created a xaml based on your requirement.

1 Like

Hi,

String variable str1 = Support is requested for tickets (suburban and taxis) in the state of Chiapas for an amount of $ 600.00. for each auditor

Use

Assign activity

Str1 = str1.split(β€œ$”.tochararray)(1).trim.split(β€œ.”.Tochararray)(0)

1 Like

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