In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
Start Free Trial

Alteryx Designer Desktop Discussions

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

RGEX Help: Remove or Keep After Character

derreck0218
6 - Meteoroid

I want to be able to either remove everything before a character or keep everything after a character.

 

In this case, I want to either keep everything after or remove every before the period:

Name2

ADLT18P
BaseDemographics.POP
Census2011_HeadlineFigures.D_AGE0004

 

 

So, I will end up with the following:

ADLT18

POP

D_AGE0004

 

I have tried a regular expression similar to this but to no avail where I had changed prior to Name4 replaced "." with ",":; however, I would prefer not to replace the period and just use perform the expression by keeping everything after the period.

 

REGEX_Replace([Name2], "(.*,\s)", "")

 

2 REPLIES 2
apathetichell
20 - Arcturus

regex_replace([Field],"(.*)\.(.*)","$2")

 

 

summit_view
8 - Asteroid

I think something like this will get you what you want:

REGEX_Replace([Name2], ".*\.(.*)", "$1")

The period you want to identify where to break the string needs an "\" before it.

Labels
Top Solution Authors