On this page
sre_parse.parse
Prev: sre_parse.fix_flags | Up: sre_parse | Next: sre_parse.parse_template
Rel: sre_parse.error, sre_parse.fix_flags, sre_parse.parse_template, sre_parse.PatternError
Ref: docs.python.org — sre_parse.parse
Tags: #public #python3 #stdlib #sre_parse
Import
import sre_parse
from sre_parse import parse
Signature & Overview
sre_parse.parse(str, flags=0, state=None)
sre_parse.parse() function.
Usage
import re
# Prefer public re.Pattern attributes or re.DEBUG
assert re.compile(r'\w+').pattern == r'\w+'
Gotchas
- Deprecated internal shim.
REPL Inspect
from sre_parse import parse
help(parse)
Linked from
- tuts/python3/stdlib_module/sre_parse
- tuts/python3/stdlib_module/sre_parse/error
- tuts/python3/stdlib_module/sre_parse/fix_flags
- tuts/python3/stdlib_module/sre_parse/parse_template
- tuts/python3/stdlib_module/sre_parse/PatternError
- tuts/python3/stdlib_module/sre_parse/State
- tuts/python3/stdlib_module/sre_parse/SubPattern
- tuts/python3/stdlib_module/sre_parse/Tokenizer
Related notes
- tuts/python3/stdlib_module/sre_parse Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/error Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/fix_flags Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/parse_template Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/PatternError Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/State links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/SubPattern links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/Tokenizer links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib