I would like to extract the smallest string that is bounded by "start" and "finish"... ie. in this case I would like to extract the string "match1".
My first guess was to use:
pattern = "start (.*?) finish";
however this matches the string "start start match1". (This behaviour is identical to using the same string and pattern with Perl5).
I know I can use the pattern:
pattern = ".*start (.*?) finish";
and get what I want, however there's a performance issue by using the greedy matcher .* at the start of the pattern. (This performance issue is specifically with Jakarta ORO, however I've tried GNU Regexp and has similar performance issues by using multiple greedy and non-greedy matchers in my regexp patterns.)
Is there another single regular expression that will extract "match1" from the above $str when you only know it's bounded by "start" and "finish".