One way is to use the option-control syntax of the source-level regular
expression notation itself:
This is excerpted from the JavaDocs for java.util.regex.Pattern at
<http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html>:
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
Special constructs (non-capturing)
...
(?idmsux-idmsux) Nothing, but turns match flags i d m s u x on - off
(?idmsux-idmsux:X) X, as a non-capturing group with the given flags
i d m s u x on - off
...
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> ...
>
> Thanks,
> Lauri
Randall Schulz