On this page
  1. re.RegexFlag
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

re.RegexFlag

Prev: re.purge | Up: re | Next: re.search
Rel: re.compile, re.error, re.escape, re.findall
Ref: docs.python.org — re.RegexFlag
Tags: #public #python3 #stdlib #re


Import

import re
from re import RegexFlag

Signature & Overview

re.RegexFlag(*values)

An enumeration.

Methods & Attributes

Usage

import re

flags = re.RegexFlag.IGNORECASE | re.RegexFlag.MULTILINE
assert re.search(r"^hello$", "line1\nHELLO", flags) is not None

Gotchas

REPL Inspect

from re import RegexFlag
help(RegexFlag)

Linked from

Related notes