I am trying to create a regex extract function in tableau. When I use the regex match function, everything works, but the same formula for extract doesn't work. Thoughts?
REGEXP_MATCH([Comments Keyed In By User],
'.*(|SC)( |)([0-9][0-9][0-9])( - | | -|-|)([0-9][0-9]|).*')
vs
REGEXP_EXTRACT([Comments Keyed In By User],
'.*(|SC)( |)([0-9][0-9][0-9])( - | | -|-|)([0-9][0-9]|).*')
Thanks
REGEXP_EXTRACT([Comments Keyed In By User], 'SC[- ]*[0-9]{3}')
(or the regex can also have word boundaries -'\bSC[- ]*\d{3}\b'
) – Wiktor Stribiżew