From: "kza" <[EMAIL PROTECTED]>
> On Sun, Jan 20, 2002 at 09:00:57PM +1300, Nick Rout wrote:
> > "Mailing Lists/Linux/CLUG" to a string like
> >
> > "Mailing Lists.Linux.CLUG"
>
> I believe perl can easily use regular expressions in a similar way to
> sed.  The perlretut and prelre man pages should help out, (don't seem
> to have those man pages here for some reason, so I won't guess the
> exact syntax, cos no doubt the / and a . have special meaning in
> regexps and will need some sort fo escaping)
>
I think that with perl you use something like \/ with the \ being the escape
character, so presumably if . requires escaping it'll be \.

So either
  s/\//./g
or
  s/\//\./g
should do the trick.

the g tells it to do a global replacement.

In case the above looks like gibberish (it does to me), it's saying

s/this/that/g with "this" being "\/" and "that" being "\."

--
Paul Wilkins
|  /\ Inform yourself | Paul Wilkins | When you ask a computer person to
| /__\ Project Mayhem | Christchurch | fix your machine, they will first
| http://tetrica.com/ | (03) 3433097 | spend hours downloading upgrades.


Reply via email to