Hi everyone
I've created this
https://regex101.com/r/GbTLKM/1
throught help of google to parse a string with the matching output when a string contains something beginning with INT and ending in a series of numbers but I can't get it to work in the Regex tool in Alteryx
(INT|int).*[0-9]$ should find and parse INTCNMAN123 in the below string
invoice INTCNMAN123
Could someone tell me what I am doing wrong?
Thank you
Solved! Go to Solution.
((INT|int).*[0-9]+)$
The string you want will be represented by $1 in Alteryx
The web site https://regex101.com/ is helpful to test regular expressions
Thank you for the reply - that makes sense. It didn't quite achieve what I want but figured it out by amending it to
((INT|int).*[0-9]{3})
as I didn't want to grab anything after the first set of numbers...if I'm honest I am not sure why it works now but it does! Regex101 website helped so thank you
The parenthesis around the entire expression will represent a group ... group 1 .. which is $1 in Alteryx
((INT|int).*[0-9]{3})
(INT|int) means either "INT" or "int"
.* means any character, one or more times
[0-9]{3} means any number 0 to 9, exactly 3 occurrences