in reply to regexp puzzle
Hm. Despite the authors protestations to the contrary, this seems like a lot of academic hot air.
The only relatively realistic example I found (scanning), was
Also, while examples as dramatic as this one rarely occur in practice, less dramatic ones do occur. Examples include using (.*) (.*) (.*) (.*) (.*) to split five space-separated fields
And despite that no one would realistically use this, it doesn't seem that pathological to me?
$s = 'the quick brown fox jumps over the lazy dog';; print time; @words = $s =~ m[(.*) (.*) (.*) (.*) (.*) (.*) (.*) (.*) (.*)]; print time;; 1294330312.674 1294330312.67453
A bit like claiming that all aircraft should be VTOL, because otherwise the time spent taking off and landing makes delivering xmas cards to your neighbours very slow.
Oh . But you're missing the point. No one delivers xmas cards by plane because it is too slow. But if the were all VTOL, you could if you wanted to.
|
|---|