regex tab in sed

Alexandre Conrad aconrad.tlv at magic.fr
Sun Jun 8 15:23:22 UTC 2008


Hi,

I'm having a hard time to figure out how to represent the tab character 
in my regular expression pattern using sed:

this works fine:
cat foo.txt | sed 's/foo/bar/'

this doesn't interpret the tab:
cat foo.txt | sed 's/\tfoo/\tbar/'

I've been reading the FAQ and sed manual, I find nothing. I tried with 
the "-r" option for sed described as "Use extended regular expression 
syntax".

This works just fine under the "normal" sed. Any ideas ? Thanks.

Regards,
-- 
Alexandre CONRAD




More information about the busybox mailing list