Regexp - (Flag|Modifier)


Flag or modifier changes the behavior of the parsing and therefore of the match.


dotall / g

A dot may matches new line or not. You specify it by specifying a flag.

Java Example with the DOTALL flag:

  • A pattern that capture the content between two XML nodes even if there is new line in there.
Pattern pattern = Pattern.compile("<top>(.*?)</top>",Pattern.DOTALL);


the i flag will perform a case insensitive match.


If you don't have access to the regular expression compiler, you may be able to disable a flag in the regular expression with the following syntax


To disable the multi-line flag (m), you would type:


Documentation / Reference

Powered by ComboStrap