Jump to content

Regex help? Extracting a User's name from the Description field


Berto2002
 Share

Recommended Posts

Hi everyone. Regex is a mystery code with magical properties! But too magical for non-coders :-)

I have emails coming in from an upstream system which I'm picking-up with routing rules and feeding into workflow.

I use this Regex to extract the email address of the user from the Summary and it works fine: (?<=\()(.*?)(?=\))

I then trawled the 'net and came-up with this Regex to extract the contents that follow the "Name:" string: (^Name:\s*\K[^:].*)

But it doesn't work, despite looking like it should in the tester. When I paste the result to the Timeline I get null/blank.

image.png.f60ae84eb70764561bde8185caed1cb8.png

This is the email when we look at Email Source:

image.thumb.png.2b79956a9598bb74ccae7a2f6cf7ce33.png

Link to comment
Share on other sites

I went with Victor's Regex and it works. Spread the word about Victor being a genius with Regex :-)

@Paul, your suggestion is in the toolbox for another time. Useful to be about to count to the start of a string and then use that later for something.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...