RE: how to escape forward slash?
"Giovanni Azua" <[email protected]> Wed, 10 Nov 2004 17:21:21 +0100
| Newsgroups | gmane.comp.jakarta.regexp.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Vawter, It does not work for me, I tried exactly that already. But I do not understand what you mean by 1.42???=20 since jakarta regexp latest release is 1.3 ... if you mean 1.4x as JSE then I would not be using jakarta regexp at all, I need regexp jakarta because I am tied to using JVM 1.3x only. Additionally I can not hardcode the replacing=20 within the java code because we have a large list of transformation patterns that must be updateable=20 without having to modify, recompile and redeploy the java files, the transformation patterns (thesaurus)=20 is included separately as a text (configuration) file. Thanks in advance, Best Regards, Giovanni > -----Original Message----- > From: Don Vawter [mailto:[email protected]] > Sent: Wednesday, November 10, 2004 5:18 PM > To: Regexp Users List > Subject: Re: how to escape forward slash? >=20 >=20 > I think you can use: >=20 > / C[/]O / / >=20 > I haven't tested this but in 1.42 =20 > s.replaceAll("C/O","xxx") works fine >=20 > I haven't tested th >=20 > Giovanni Azua wrote: >=20 > >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=20 > 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] > > > > =20 > > >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >=20 >=20