Robert Klemme
9/22/2008 7:12:00 AM
2008/9/22 Kyung won Cheon <kdream95@gmerce.co.kr>:
>>> "a 1 b".sub(/\b1\b/, "2")
> => "a 2 b"
>>> "a * b".sub(/\b\*\b/, "2")
> => "a * b" # Why not "a 2 b" ???
>
>
> How ??
Because neither " *" nor "* " are word boundaries.
Cheers
robert
--
use.inject do |as, often| as.you_can - without end