Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

RegEx Match - Beginning of a line is a number

Kristie_Pires
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 ANTWORTEN 3
binuacs
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
Asteroid

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

Beschriftungen
Top-Lösungs-Autoren