You can use this regex:
(?:((?:^|_)BLAH_[0-9]+)+)
Question
Is there a regular expression that matches several (one or more) occurrences of a specific string followed by underscore and number, followed by single underscore and a completely arbitrary string.
For example, if a specific string is "BLAH", I am looking to extract BLAH_45435_BLAH_6787_BLAH_454335
from
BLAH_45435_BLAH_6787_BLAH_454335_ThisIs_My_name
.
It is safe to assume that the whole input does not include empty spaces (it is a name of a Maya object). The language implementation is Mel in Maya.
Solution
OTHER TIPS