Regular expresions for particular data

How to get the single data if regular expressions fetch two values…
ex: GSTN: 3472 6747
Above two values are different how i can get single value

There is few ways you can extract these numbers.

You can select all numbers that are of length 4 with “\d{4}”

Or you can select everything after GSTN: and then Split it after a white space

The Regex patterns is (?<=GSTN: ).*

You will select 3472 6747

After that you can use Split(" "C) and get the first value at index 0

(?<=GSTN: ).* after applaying the this regular ex i got values like 2334 6578…
Then i assigned to a single variable. Then how i can get that any single value

Try this with match and get the group :

\bGSTN: (\d+\s\d+) OR

\bGSTN: (\d{4} \d{4}) for exactly 4 digits.

To get the string in multiple groups use the round brackets accordingly:

\bGSTN: (\d{4})\s(\d{4})

regards,
Rajesh

Hi @Madhukumar_M

Assign these values to string array

And based on the split you can use strvar.split(""c)

Thanks
Ashwin.S

You need to create StringArray variable, lets say it name is StrArr, then use Assign

StrArr = SingleValue.Split(" "C).

After that you can use StrArr(0) to get the first value and StrArr(1) to get the second value