RE: how to escape forward slash?
"Giovanni Azua" <[email protected]> Fri, 26 Nov 2004 19:35:28 +0100
| Newsgroups | gmane.comp.jakarta.regexp.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Michael and Vawter, Thank you very much for your will to help. I found out already, it was quite simple problem :-( my thesaurus is a file having the columns: <pattern><separator><replacement> the separator I was using with StringTokenizer was=20 precisely forward slash (/) the rest you can easily=20 figure out :-) nothing to do with regex. Thank you again, Best Regards, Giovanni > -----Original Message----- > From: Michael McCallum [mailto:[email protected]] > Sent: Thursday, November 25, 2004 1:52 AM > To: Regexp Users List > Subject: Re: how to escape forward slash? >=20 >=20 > Hi,=20 > The problem will be that whatever is parsing your thesaurus=20 > (text file) is not=20 > escaping the / so it only passes " C\" to regexp rather than=20 > " C/O / " as you=20 > desired. Hence the string is terminated with an escape, which=20 > is invalid. >=20 > kind regards >=20 > Michael >=20 > On Thu, 11 Nov 2004 04:50, 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=20 > terminates > | string ... > | PATTERN ERROR in line: / C\/O / / > | > | Thanks in advance, > | > | Best Regards, > | Giovanni > | > | =20 > --------------------------------------------------------------------- > | To unsubscribe, e-mail: [email protected] > | For additional commands, e-mail:=20 > [email protected] >=20 > --=20 > Michael McCallum > Software Engineering Manager > SnapHire Inc > land: +64.9.308.0329 > cell: +64.21.576.907 > http://www.SnapHire.com/ >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >=20 >=20