nikolaj lindberg
2008-09-11 09:50:34 UTC
Hi List[ScalaUser],
does anyone know if there is a way to make a scala.util.matching.Regex (the
one returned by RichString.r) case insensitive for Unicode strings?
That is, I want case insensitive matching that works for non-Latin
alphabets.
In Java, you can do
import java.util.regex.*;
Pattern p = Pattern.compile(regEx,
Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE);
and since there appears to be a Java Pattern lurking inside Scala's Regex,
maybe there is some way to do this in Scala too (without resorting to using
the Java classes directly)?
Kind regards,
/nikolaj
does anyone know if there is a way to make a scala.util.matching.Regex (the
one returned by RichString.r) case insensitive for Unicode strings?
That is, I want case insensitive matching that works for non-Latin
alphabets.
In Java, you can do
import java.util.regex.*;
Pattern p = Pattern.compile(regEx,
Pattern.CASE_INSENSITIVE|Pattern.UNICODE_CASE);
and since there appears to be a Java Pattern lurking inside Scala's Regex,
maybe there is some way to do this in Scala too (without resorting to using
the Java classes directly)?
Kind regards,
/nikolaj