Alteryx Designer Desktop Discussions

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

easy regex question

lliberm1
7 - Meteor

i want to find within large text whether the format "(xxxx)" is contained where "x" is any character (letter or number).

I am not clear on the syntax but thought it would be something along the lines of...

REGEX_Match([Fund],".*(....).*")

as my understanding is the period is the wildcard for any character and ".*" allows for anything before or after

2 REPLIES 2
apathetichell
18 - Pollux

. is anything (%$\s\tetc...) so it's not just a letter of number. \w would be letter,number,underscore [0-9a-zA-Z] would be any letter/number and {4} would be four of those.

 

But are you looking for four in a row of the same - or just 4? assuming the alter i'd use ".*[0-9a-zA-Z]{4}.*" in my regex_match. If you need it to be enclosed within parenthesis you will have to use ".*\([0-9a-zA-Z]{4}\).*" because parenthesis are special characters in regex.

jrgo
14 - Magnetar

Hi @lliberm1 

 

Try this…

 

REGEX_Match([Fund],".*\(.{4}\).*")

Labels