If:
1. A regular expression contains a parenthesized subexpression which is quantified, and the inner expression is quantified as well (for example, '(.+)+') and
2. The text string contains a long series of matches of the subexpression and
3. The regular expression does not match the string,
it can take REGEXP a long time to determine that a match cannot be made. For example,
str = 'ltbwithupdatedbendsandmatchedoptics3/8/04,';[s f t] = regexp(str,'^\d*(\w+\d*)*:,');
runs for several minutes without returning a result.
Best Answer