in reply to Abbreviation regex?
/^a($|b($|b($|r($|e($|v($|i($|a($|t($|i($|o($|n$)))))))))))/
In both yours and mine, (?:...) would be faster than (...). I left it as is for the sake of simplicity.
Of course, the simpliest solution would be substr($word, 0, length($str)) eq $str, but it's non-regexp.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Abbreviation regex?
by Tanktalus (Canon) on Jan 16, 2006 at 17:37 UTC |