- <> writes:
> I tried
>
> String regex = "[([\\x00-\\x7F])&&[^([\\x00-\\x1f\\x7f])]]";
You are guessing blindly now. Good thing it didn't appear to work.
Do read up on the format of regular expressions before trying that
again

<URL:http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html>
CHAR except CTL would be the characters 0x20-0x7e, which is most easily
written directly:
"[\\x20-\\x7e]+"
> and then test for "\u007f".matches(regex) and it returns true which is
> obviously wrong.
It's what you asked for, although I'm surprised that it gave "true".
The string is not a valid Regular Expression (the first ")" is
unmatched, since the first one is inside a character group).
/L
--
Lasse Reichstein Nielsen -
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'