Hi,
I am using java 1.3 and jakarta regexp 13. jar

I want to match a string like "abc 123 pqr" and substitute "abc " with "XYZ
"
Anything after "abc " can come in the new line.
i wrote a Reg Expr 

RE re1  = new RE("<!abc [^\s]*",RE.MATCH_CASEINDEPENDENT );
this gives me complier error "illegal escape character"

I tried another one
RE re1  = new RE("<!abc [^[:space:]]*",RE.MATCH_CASEINDEPENDENT );
this gives me run time error 

 Syntax error: Mismatched class
      at org.apache.regexp.RECompiler.syntaxError(Unknown Source)
      at org.apache.regexp.RECompiler.terminal(Unknown Source)
      at org.apache.regexp.RECompiler.closure(Unknown Source)
      at org.apache.regexp.RECompiler.branch(Unknown Source)
      at org.apache.regexp.RECompiler.expr(Unknown Source)
      at org.apache.regexp.RECompiler.compile(Unknown Source)
      at org.apache.regexp.RE.<init>(Unknown Source)


any clues ?
Jeevan



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to