Alteryx Designer Desktop Discussions

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

Regex

Sarath27
アステロイド

Hi All,

 

I want to write a regex to find a string which starts and ends with an Numerics. Please assist.

8件の返信8
aatalai
マグネター

create a new field push it through data cleanese say remove punctuation, numbers etc (everything but letters); then use this formula

 

left([field],1) =left([new field]) and  right([field],1) =right([new field]) , if true then starts and end with an alphabet character but @Sarath27 that would be not using regex

DataNath
キャスター

@Sarath27 when you say 'find a string', are you looking to Filter? If so, the following expression will isolate only records that start and end with numbers (just replace [Input] with your own field):

 

 

IsInteger(Left([Input], 1))
&&
IsInteger(Right([Input], 1))

 

binuacs
ポラリス

@Sarath27 

Regex_MATCH([Field),"^\d.*\d$")
Sarath27
アステロイド

Hi Binu,

 

It shows as malfunction call

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Sarath27,

 

@binuacs is close but there's just an issue with the brackets used and the quotation marks:

 

Regex_MATCH([Field],'^\d.*\d$')

 

Kind regards,

Jonathan

cjaneczko
パルサー

@Jonathan-Sherman his use of double quotes is correct. You can use Single or Double quotes as long as both are the same.

Jonathan-Sherman
15 - Aurora
15 - Aurora

@cjaneczko they are but it's the use of two right unicode double quotation marks that's the issue, not the fact that it's a double quote.

 

Kind regards,

Jonathan

binuacs
ポラリス

@Sarath27 I updated my original post as the answer was submitted from my phone which doesn't support the proper double quotes 

投票
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
ラベル