Home > Archive > Java Help > March 2004 > Re: delim doubt
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Lāʻie Techie 2004-03-27, 12:29 am |
| On Tue, 16 Mar 2004 13:16:26 +0000, Ricardo Abreu wrote:
> hi
> I'd like to use a StringTokenizer with a "delim" formed by all the
> characters that don't verify the condition isLetter(). Can anyone give me
> a clue on how to do this? is there anyway to make a String with all
> characters appearing once and only once?
> Thxxx
Seems easier to split the String using a regex if you're using j2se 1.4
or higher.
"[^\p{ALPHA}]" matches anything not an "alphabetic character" (defined to
include uppercase and lowercase letters, but not necessarily title case).
Check out java.lang.Character and the java.util.regex package (especially
the Pattern class) to come up with a regex that better meets your needs.
HTH,
La'ie Techie
| |
| Roedy Green 2004-03-27, 12:30 am |
| On Sun, 21 Mar 2004 06:38:16 GMT, L??ie Techie
<laie@wing_this_etsolutions.com> wrote or quoted :
>Seems easier to split the String using a regex
see http://mindprod.com/jgloss/regex.html for some examples.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
|
|
|
|
|