[wplug] escaping in sed

William Powell billpwl1 at attbi.com
Wed Apr 30 12:11:25 EDT 2003


from the info page for sed:

`\%REGEXP%'
     (The `%' may be replaced by any other single character.)

     This also matches the regular expression REGEXP, but allows one to
     use a different delimiter than `/'.  This is particularly useful
     if the REGEXP itself contains a lot of `/'s, since it avoids the
     tedious escaping of every `/'.  If REGEXP itself includes any
     delimiter characters, each must be escaped by a backslash (`\').


Russ Schneider wrote:

> If I'm using sed for
>
> sed s/NEEDLE/NEWNEEDLE/
>
> and NEWNEEDLE is http://www.sugapablo.com/
>
> How do I escape the /'s?
>

-- 
Linux:  It's the way to go!





More information about the wplug mailing list