Period (or dot)

Top  Previous  Next

Outside a character class, a dot in the pattern matches any one character in the subject, including a non-printing character, but not (by default) newline. If the PCRE_DOTALL option is set, then dots match newlines as well. The handling of dot is entirely independent of the handling of circumflex and dollar, the only relationship being that they both involve newline characters. Dot has no special meaning in a character class.


Note: This topic was taken from the PCRE library manual. The PCRE library is open source software, written by Philip Hazel <>, and copyright by the University of Cambridge, England.