Re: how to escape forward slash?

Don Vawter <[email protected]> Wed, 10 Nov 2004 09:17:32 -0700
Newsgroups gmane.comp.jakarta.regexp.user
Message-ID <[email protected]>
I think you can use:

 / C[/]O / /

I haven't tested this but in 1.42     s.replaceAll("C/O","xxx") works fine

I haven't tested th

Giovanni Azua wrote:

>Hello all,
>
>Does anyone know how to escape forward
>slash using jakarta regexp, the funny
>thing is that sed understand well the
>escaping of forward slash: \/ but regexp
>does not.
>
>e.g. when providing the pattern:
>
>/ C\/O / /
>
>I get the following error:
>
>org.apache.regexp.RESyntaxException: Syntax error: Escape terminates string
>...
>PATTERN ERROR in line: / C\/O / /
>
>Thanks in advance,
>
>Best Regards,
>Giovanni
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]
>
>  
>