Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How can one parse multiple twitter handles and the actual text using RegEx?

Smckenna
5 - Atom

I am a very new student to Alteryx and am trying to use RegEx to help parse information I have from Twitter.  I captured text from a twitter account and need to parse out the twitter handle and text.  Some of the tweets have multiple names to the one text. 

 

For example:

@NiceKid @greatnephew @nannaT Can't wait to see you in Florida!

 

I have rows of tweets of varying lengths, some with none, one or more "@"names and then text (or emoji).  So There is no distinct pattern, other than the tweet handles start with "@".

 

How can I parse out the @handles from the text using RegEx?

 

Thank you in advance!

 

 

 

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

Add a RecordID to each row.  Take the data into a RegEx tool:

 

Expression:  @\w+

TOKENIZE:

Split to Rows

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
echuong1
Alteryx Alumni (Retired)

See attached for example. I essentially parsed out the handles to separate lines and also the text from the tweet. From there I joined them back together.

 

echuong1_0-1581452113990.png

 

Let me know if that works!

Smckenna
5 - Atom

That worked well to separate out the twitter handles in each "text" and creating new records but it removed the text information in that column rather than parsing the text into a new column.

Smckenna
5 - Atom

That's it!   Thank you, echuong1!

Labels