Search code examples
regexalteryx

Match Regex CR-00000 pattern


I need a regex expression which would parse my text pattern: CR-000000. There may be a text but somewhere inside would be the pattern, sometimes two - i need to extract only the part matching the pattern

I have created the following pattern but still doesn't work [CR-]{6}[0-9]

[CR-]{6}[0-9]

From the following example: The change Request has been created for the location below. CR-0001083 Click this link to access the Change Request Change Request ID :  CR-0001086 Property ID:  CK1014 - the output would be CR-0001083 CR-0001086


Solution

  • Thanks, CR-[0-9]{7} resolves the thing!