Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

How to split a string before a text using RegEx

Aria_S
7 - Meteor

Hi,

 

I am trying to split a column right before "AT" followed by a digit using Reg Ex. Example:

 

Input:

Field 1
aeccr53424drgef32453AT102030fanewors
 
wedx253wdasdfkjreAT0203103wec244255v
 
kerthwATjeeydkAT230193ertogisnfslae

 

Output:

Field 1Field 2
aeccr53424drgef32453AT102030fanewors
  
wedx253wdasdfkjreAT0203103wec244255v
  
kerthwATjeeydkAT230193ertogisnfslae

 

Can you please help me with an expression that I could use to achieve the same?

 

Help is very much appreciated!

 

Thank you!

6 REPLIES 6
Aria_S
7 - Meteor

@grazitti_sapna , @ChrisTX any thoughts?

Aria_S
7 - Meteor

I am using AT1(.*) but it will only work for AT1###

ImadZidan
12 - Quasar

@Aria_S ,

 

an idea.

 

Hope it helps

vizAlter
12 - Quasar

@Aria_S — Attached workflow has both the methods — (1) When "AT" is followed by 6 digits, (2) When "AT" is followed by any digit

 

vizAlter_1-1598080983615.png

 

 

 

If this posts assists in resolving the question, please mark it "Like", or "Solved" if it resolves the question. This will help other users find the same answer/resolution. Thank you.

wwatson
12 - Quasar

REGEX Parse (.*)(AT\d.*)  should work

grazitti_sapna
17 - Castor

Hi @Aria_S , You can try this 

 

grazitti_sapna_0-1598245599111.png

 

Regex-(.*)(AT\d.*)

 

The regex will work for the following pattern having AT follwed by digits and then some string.

 

Thanks.

 

Sapna Gupta
Labels