How to extract multiple details on a file

Hi Forum,

I would like to know how can I extract details with this kind of format. I would like to get all the details per person.

Sample File:

Some files have more than 20 persons to be extracted.

Hi @JustineLim

Read the file into a string variable(str)
Use regex as below to extract each field(change the label according to the field you need)

System.Text.RegularExpressions.Regex.Matches(str,“(?<=Name: )\w+”)

This will give you a matchcollection as output

which you can loop using for loop to get each identified value(Change type argument in for loop to match)

currentitem.Value will give the identified value


1 Like

Hi Anil G,

Thanks for the response. Will try this approach

1 Like

Hello @JustineLim

You can use the Regex expression to achieve this or use the Matches activity.


Then create the regex using RegexBuilder.


You can also use Text to Right/Left Activity.