That's a little speed optimisation, with /\w{3}/ the regex engine sees the {} construct and has to start counting. If you write it out it's just three single characters in a row, so no counting => quicker.
Of course, this could be optimised by the regex compiler but that wasn't the case at the time of writing of Mastering Regular Expressions. At least this is where I got this from. As japhy is more up to date on this I assume he has checked that this optimisation hasn't been done in the meantime.
-- Hofmator
In reply to Re3: How do I tighten this with map?
by Hofmator
in thread How do I tighten this with map?
by SparkeyG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |