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

Discover More
Javascript - String

The in javascript. A string in JavaScript is encoded with the ucs-2 16-bit character set. An element of a JavaScript string is therefore a 16-bit code unit. code unitscode pointssurrogate pair Strings...
Multilingual Regular Expression Syntax (Pattern)

Regular expression are Expression that defines a pattern in text. This is therefore a language that permits to define structure of a text. They are a mathematically-defined concept, invented by Stephen...
Card Puncher Data Processing
Php - Regular expressions (Perl-compatible)

in Php are an implementation of Perl (PCRE) with the PCRE library (See ). Therefore, the syntax for patterns used in these functions closely resembles to Perl (PCRE) but not totally. See reference.pcre.pattern.differencesPerl...
Regexp - Dot (Single Character pattern)

Dot . in a regular expression matches any character in the supported character set with this characteristic, by default: newline characters are not included without setting a flag. See matchnewline...
Regular Expression - Group (Capture|Substitution)

Construct Definition (? | X, as a named-capturing group | ^ ^^ | (?:X) | X, as a group | | (?>X) | X, as an independent, group | ^ Assertion (See ) ^^ | (?=X) | X, positive lookahead (via zero-width)...

Share this page:
Follow us:
Task Runner