Extracting field data from an email using Regex


I need a helping hand with using RegEx in UiPath.

I have a requirement to extract the following information from an email (mock-up example is below). This text could be anywhere in the email which is why I want to use RegEx.

Would anyone be able to assist with some direction on how to extract ‘name’ and I will start to learn from there and some extra links on the best videos/tutorials would be handy.

name : John Smith
email : John.Smith@gmail.com
additional-comments : Hi
I need to request a leave form.
Kind regards,

Thank you :slight_smile:

Hey @Steven_McKeering

You can use below simple regex pattern - name\s:(.*)

Reference Link - regex101: build, test, and debug regex


1 Like

Super simple if your data will look relatively the same, or will always start with a easily identified string

(?<=name :).*(?=\n)

or simply: (?<=:\s).*(?=\n)

1 Like

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