Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Email address parse, RegEx?

StephenMoss
アトム

Hi 

 

I need some help parsing a list of email addresses. They are in two formats: 

 

monica.geller@aaa.com

chandler.m.bing@aaa.com

 

What I require is a separate first name and second name column and discarding the middle initial i.e:

 

First              Second

Monica         Geller

Chandler      Bing

 

Thanks for your help in advance! 

12件の返信12
OllieClarke
15 - Aurora
15 - Aurora

Hi @StephenMoss try this:

(.*?)\.(?:.*\.)?(.*?)@

in Parse mode

OllieClarke_0-1580297931348.png

 

hope that helps,

 

Ollie

StephenMoss
アトム

This works very well indeed. 

 

Much appreciated! 

MarqueeCrew
20 - Arcturus
20 - Arcturus

Please try:

 

(\w+)\.*\w+\.(\w+)\@.*

inside of a regex tool to parse. 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
arundaka02
アステロイド

Hi @OllieClarke 

 

I have a similar query to @StephenMoss . The email address formats are the same but my desired output is slightly different:

 

arundaka01_0-1598454593880.png

 

Essentially I'd like to:

  • Keep the middle initial
  • Have the full name displayed in one column (first name, middle initial and surname)
  • have the first letter of first and surname capitalised the middle initial capitalised too

 

Please can you help?

 

Many thanks!

KA

OllieClarke
15 - Aurora
15 - Aurora

Hey @arundaka02 try this formula in a formula tool:

TRIM(TITLECASE(REPLACE(REGEX_REPLACE([email],'@.*',''),'.',' ')))

Hope that helps,

 

Ollie 

bb213
アステロイド

@MarqueeCrew  your method above cuts off names.  For example, james.smith@xy.com,  the first name becomes "jame". 

 

Ma3stro
アトム

Hi @bb213,

 

If you have a bit of regex that is close to the desired output, you can play around with and test different regex configurations here: https://regex101.com/

 

It's 100% free and user friendly. I've found this site extremely useful lately.

 

Hope that helps!

rohit782192
ボリード

Is there a Simple way to understand, Look like your parse finding difficult to understand.

 

 

I am a beginner in Regex.

rohit782192
ボリード

Your regex is not working for me.

 

I want for

 

someone1234@gmail.com

ラベル