in reply to Re: Matching Regular expression at EOF
in thread Matching Regular expression at EOF
Wouldn't anchoring the pattern at the end of the string with \z or one of its ilk (e.g., m{ pat \z }xms) tend to be faster since the .* doesn't need to 'consume' virtually the whole file? Or is this the kind of thing that just gets optimized away?
Update: Contrary to krish28's clarification in Re^2: Matching Regular expression at EOF, this question assumes the entire file is held in a single string. But the question still stands.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Matching Regular expression at EOF
by ikegami (Patriarch) on Feb 20, 2010 at 19:42 UTC | |
|
Re^3: Matching Regular expression at EOF
by JavaFan (Canon) on Feb 22, 2010 at 16:52 UTC | |
by AnomalousMonk (Archbishop) on Feb 22, 2010 at 21:53 UTC |