Free Trial

Alteryx Designer Desktop Discussions

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

RegEx Match - Beginning of a line is a number

Kristie_Pires
8 - Asteroid

Hello all,

 

I am trying to build a simple regular expression that lets me know if the first character is a number. For example, if the field contains "1 appraisal",  then I would have a match because it starts with "1" - a number. If the field contains "Annual Review 2," then there is no match because it doesn't start with a number.

 

I wrote this in a filter tool, Regex_Match ([field name], "[^\d]")

 

What am I doing wrong? I thought the ^ was for the beginning of a line, and the \d was for numerical values. 

 

I appreciate your help!

3 REPLIES 3
binuacs
21 - Polaris

@Kristie_Pires  [^d] - means match a single character not present in the field. ^\d indicating the start of the line, you can re-write the formula like below

 

REGEX_Match([Input], '^\d.*')

alexnajm
17 - Castor
17 - Castor

Try Regex_Match ([field name], "^\d.*")

Kristie_Pires
8 - Asteroid

Thank you @binuacs  and @alexnajm !! I appreciate it.

Labels
Top Solution Authors