I have an input source with a field AC_NUM that can start with a digit or a letter. Examples are
88584848
MF83838
I want to place a filter on this input source so I can have two data streams: one where the field starts with a digit and another where the field starts with a digit.
so far I have a filter tool with the formula regex_match([AC_NUM],"^\D"). this does not work. There are no results in the true and all results are in the false.
what am i doing wrong? when i put ^\D into https://regex101.com/ to test, it highlights the M so I thought this should work. It highlights nothing on the 88584848.
Solved! Go to Solution.
Try this:
regex_match([AC_NUM],"^\d.*")
Your D needs to be lowercase (regex_match is case sensitive) and you need a .* afterwards so that it checks the rest of the field.
Alternatively you could use
regex_match(LEFT([AC_NUM],1),"^\d") which would do the same thing but only look at the first character
regex always plays with my brain too. i tend to go with the long winded but easy for me left([AC_NUM],1)>="0" && left([AC_NUM],1)<="9"
Iain
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |