Re: Matching characters with multiple represenations w/o using java.text.Collator

"Daniel F. Savarese" <[email protected]> Sun, 18 Aug 2002 00:16:30 -0400
Newsgroups gmane.comp.jakarta.oro.user
Message-ID <[email protected]>
In message <[email protected]>, "Wong, A
lbert" writes:
>Is there a common way to get the benefits of OroMatcher in scanning a file for
> a paticular match AND have it know that given a locale, certain characters or
> equal to others (like the java.text.Collator)?

Matching in jakarta-oro is strictly based on character values.  Given
some redesign, it would be possible to handle locales when single
characters have multiple single character representations.  It doesn't
seem to me that multi-character sequences could be accommodated.  I
would think this might be handled transparently through a CharSequence
in JDK 1.4 that would pre-parse the input and return a single value for
multi-character sequences depending on the locale.  The traditional
regular expression way of handling the case you describe is to write
  m(a-umlautd|ae)chen
to match madchen and maechen.

daniel