String.replaceAll problem processing "value { { {"
From: Peebster_99 (Peebster_99_at_yahoo.com)
Date: 03/05/04
- Next message: nos: "Re: How to detect programmatically if my machine is behind a firewall"
- Previous message: Swaroop Kumar: "How to detect programmatically if my machine is behind a firewall"
- Next in thread: hiwa: "Re: String.replaceAll problem processing "value { { {""
- Reply: hiwa: "Re: String.replaceAll problem processing "value { { {""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 5 Mar 2004 10:12:07 -0800
I would like to use String.replaceAll() in order to replace substrings
that equal: "value { { {" with this string: "value { {".
When attempting to invoke replaceAll as follows:
String s = ("value[\\s]{\\s");
output.replaceAll(s ,"value { {");
The following error result below produced at runtime. Using \\s for
whitespace yields similar results. Can someone point out to me what
I'm doing wrong here?
Thanks,
java.util.regex.PatternSyntaxException: Illegal repetition near index
5
value { { {
^
java.util.regex.PatternSyntaxException: Illegal repetition near index
5
value { { {
^
- Next message: nos: "Re: How to detect programmatically if my machine is behind a firewall"
- Previous message: Swaroop Kumar: "How to detect programmatically if my machine is behind a firewall"
- Next in thread: hiwa: "Re: String.replaceAll problem processing "value { { {""
- Reply: hiwa: "Re: String.replaceAll problem processing "value { { {""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|