I have a need to set the regex flags (especially i) from within the pattern, rather than outside in the RegExp constructor in javascript. In a java.util.regex.Pattern I can just put "(?i)abc" to match "abc" and "ABC". But this throws an error in javascript. So it it really not possible to change the flas within a regex or for a group as in "...(?i:abc)..."?