Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Parse Tool help

rrahu07
8 - Asteroid

Can someone please help me to write a regex code to get column "B" from column "A"

 

9 REPLIES 9
IraWatt
17 - Castor
17 - Castor

Hey @rrahu07,

I would use this:

(\w+$)

The $ means end of text, so it grabs all the word characters at the end of the string:

IraWatt_0-1661369097632.png

If you want to learn more about Regex the community has some really quick interactive videos on getting to grips with it here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Parsing%20...

 

Any questions or issues please ask

Ira Watt
Technical Consultant
Watt@Bulien.com 

 

IraWatt
17 - Castor
17 - Castor

@rrahu07 Alternatively you could use:

([^}]+$)

Which would grab all the text which is not a } from the end of the text

DataNath
17 - Castor

Already got a perfectly viable solution but just thought I'd post this alternative - in the latest Alteryx & Beer chat, @MarqueeCrew mentioned how computationally expensive RegEx is/can get and so I've been keen to play around with standard String functions recently for scenarios with more structure:

 

 

Right([Name], FindString(ReverseString([Name]),'}'))

 

 

DataNath_0-1661371386657.png

rrahu07
8 - Asteroid

Hi @DataNath and @IraWatt how can I parse this one?

 

{http://www.irs.gov/efile}ReturnData/{http://www.irs.gov/efile}IRS1118/1/{http://www.irs.gov/efile}IR...

 

I am trying to get 

{http://www.irs.gov/efile}ReturnData/{http://www.irs.gov/efile}IRS1118/1/{http://www.irs.gov/efile}IRS1118ScheduleA/{http://www.irs.gov/efile}IncmLossBfrAdjFrgnTxsPdAccrGrp/5/{http://www.irs.gov/efile}InclusionSection951AGrossUpAmt  in four different column. 

can you please help?

IraWatt
17 - Castor
17 - Castor

@rrahu07 are you trying to get the bit within the { } ?

IraWatt
17 - Castor
17 - Castor

This method can get the URLs within the {} though they are all the same in this case:

IraWatt_0-1661896998790.png

 

rrahu07
8 - Asteroid

@IraWatt I am trying to get element outside of {}

rrahu07
8 - Asteroid

ReturnData 

IRS1118

IRS1118ScheduleA

IncmLossBfrAdjFrgnTxsPdAccrGrp

InclusionSection951AGrossUpAmt 

 

DataNath
17 - Castor

@rrahu07 how does this look when applied to your data? This uses the RegEx tool in Tokenize mode.

 

}([A-Za-z0-9]+)

 

DataNath_1-1661900673728.png

DataNath_0-1661900658820.png

Labels