We’ve extended Inspire Early Bird Pricing until March 1. Register now and enjoy 20% off conference passes and 10% off training passes. P.S. Don’t forget to bring friends! When you sign up for five or more tickets, you get an extra 20% discount on conference passes. Learn more now.

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
18 - Pollux

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