Re: Escaping special characters

Schamil Wackenhut <[email protected]> Tue, 1 Apr 2003 23:39:51 +0200
Newsgroups gmane.comp.jakarta.regexp.user
Message-ID <20030401213951.GA2982@fuckup>
* patrick clancy meinte:

> I've tried things like \\. or \\- or \\[ but these are incorrect. What is
> the correct way to escape these characters?

\\. is the right way to escape a dot. See page 390 in Jeffrey Friedl's 
"mastering regular expressions" 2nd edition

...
String[] result = Pattern.compile("\\.").split("209.204.146.22");
...

n8
-- 
/earth: file system full.