in reply to Re: Re: removing C style comments from text files
in thread removing C style comments from text files

I just tried it and it worked! I've never seen a regex contained in braces before...and what's the deal with the empty braces at the end?

thanks!
  • Comment on Re: Re: Re: removing C style comments from text files

Replies are listed 'Best First'.
Re: Re: Re: Re: removing C style comments from text files
by dominix (Deacon) on Jan 07, 2004 at 08:30 UTC
    you can use brace in place of traditional // in match
    m{ } <=> m/ / and in searchreplace s{what}{replace}imsogxe <=> s/what/replace/imsogxe
    in perlretut you have these examples. "/World/", "m!World!", and "m{World}" all represent the same thing. so the empty Brace means "replace with nothing"
    --
    dominix