[plug] help with sed
Russell Steicke
r.steicke at bom.gov.au
Thu Mar 15 12:49:44 WST 2001
On Thu, Mar 15, 2001 at 12:37:23PM +0800, Matt Kemner wrote:
> Replace the + with a * and escape the brackets
>
> ie:
>
> ps x |grep foo | sed 's/^\ *\([0-9]*\).*$/\1/g'
Thanks, Matt, this works. But does anyone know why the + doesn't have
the obvious effect (match 1 or more)? Or are sed regexes a lot different
from awk and grep?
> - Matt
--
Russell Steicke
-- Fortune says:
All I ask is a chance to prove that money can't make me happy.
More information about the plug
mailing list