Now according to all the literature
echo 1234abcd|sed "s|[0-9]\+|#|g"
should return #abcd. And
echo abcd|sed "s|[0-9]\+|#|g"
should return abcd.
But on OS X 10.4.11 the first expression returns 1234abcd. Using * instead of + works for the first example but fails on the second, returning #abcd, because the [0-9] pattern is matched zero times.
Does the + operator not work in regular expressions in OS X? Is there an alternative?
Thanks