Getting a specified text from a string

I have a string like this…

string=123-456789-123 IN Current account

how to extract 123-456789-123 from the string…Can anyone help me ??


Use below regular expression to fetch the required value.


Hi @Usha_Sree

You can use Regex or split method to get the value

Split (StringVar," ")(0)

For Regex try this


1 Like

Thank you
its worked.
Can you explain what does it exactly mean…Split(VAR," ")(0) …??

Sure @Usha_Sree

It will split all the words which has space between and store that in an array and you can call the array index which you need in your the req text is before the space so Split(," ")(0)


yeah, got it.
Thank you