Regex command to obtain dynamic data

Dear all,
There is a use case where I need to fetch GST number from any document. It may start like this:
image
or
image
or there can be any other text after the GST new line.
Please help to find regular expression for this.

1 Like

@Anamika15

GST number has standard format.You can try like this to fetch it.
\d{2}\w{5}\d{4}\w{1}\d{1}\w{2}

1 Like

GS TIN : \w.+ try this once @Anamika15

1 Like

Thanks for the response :slight_smile:
Is there a way to obtain only the GST IN number?
currently I am getting GS TIN : 07AAKCS5183MIZP, but I need 07AAKCS5183MIZP only.

once you got the number GS TIN : 07AAKCS5183MIZP like then use split operation with : then take the value at 1 index.

Use Replace matchod (“GS TIN:”, " ");

item.ToString.Replace(“GS TIN”,"").Trim

Hi @Anamika15

Use Regex expression as (?<=GS TIN :).* in matches activity and try

Thanks
Ashwin S

1 Like

If the document format is fixed or standard document go with Anchor base inside that use
“Find Element” activity and then find value by using “Get Value” or “Get text”.

(?<=GS TIN : )\w+

Use this regex it select after GS TIN number

Thanks
@Anamika15

1 Like

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