in reply to A tidier regex ?
Although factoring out the [A-Z0-9]* may be considered. Now, if you know the data cannot contain lowercase letters (or at least, you know you won't get any more matches if you'd first uppercased the string you match against), you could replace the [A-Z0-9]* with [[:alnum:]]*./\b (?: CDC_ [A-Z0-9]* _ [A-Z0-9]* | DDC[SR]MR [A-Z0-9]* ) \b/x
|
|---|