> String whole = "4 3,3 2.2 3|0(4)";
> String[] pieces = whole.split("\\D+");
>
> If you chop up a lot of different Strings with the
> same regular expression, consider compiling the regex to
> a Pattern just once and using it many times.
Whats that ??? How does that works? I mean what's D in that pattern?
Hendrik Maryns - 20 Jun 2006 09:48 GMT
9GB schreef:
>> String whole = "4 3,3 2.2 3|0(4)";
>> String[] pieces = whole.split("\\D+");
[quoted text clipped - 4 lines]
>
> Whats that ??? How does that works? I mean what's D in that pattern?
STFW: google java regex
Amongst others:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
H.
- --
Hendrik Maryns
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Thomas Fritsch - 20 Jun 2006 10:19 GMT
9GB schrieb:
>> String whole = "4 3,3 2.2 3|0(4)";
>> String[] pieces = whole.split("\\D+");
[quoted text clipped - 4 lines]
>
> Whats that ??? How does that works? I mean what's D in that pattern?
Read the API doc of the String's split(String) method
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#split(java.lang.String)>
and follow the links (concerning regular expressions) given there.

Signature
Thomas
Eric Sosman - 20 Jun 2006 14:45 GMT
9GB wrote On 06/20/06 04:29,:
>> String whole = "4 3,3 2.2 3|0(4)";
>> String[] pieces = whole.split("\\D+");
[quoted text clipped - 4 lines]
>
> Whats that ??? How does that works? I mean what's D in that pattern?
"Use the For-- er, the Javadoc, Luke."

Signature
Eric.Sosman@sun.com