in reply to Re: Regex problem - (non)greedy?
in thread Regex problem - (non)greedy?
$x =~ /.* cd (.*?) ghi/x
Is better, but can't test ATM... : )
Cheers Rolf
( addicted to the Perl Programming Language)
Moved ? into group...
PS: ikegami msged me in the meantime thx :)
> ikegami says Re Re^2: Regex problem - (non)greedy? By the way, you really want to add a leading ^ to that to speed things up greatly when the pattern doesn't match.
He's (normally) right! ++
might depend on how nifty Perl optimized the regex...
|
|---|