file_re

Getting started

  • Installation
    • From PyPI
    • Supported platforms
    • Python requirements
    • Building from source
    • Development install
  • Quickstart
    • Basic search
    • Capture groups and named groups
    • findall and finditer
    • Compiled patterns
    • Flags
    • Compressed files
    • Large files

Guides

  • Large files and max_span_lines
    • The three modes
    • Memory trade-offs
    • Behavior when a match would exceed the window
    • Search returns the first match
    • Multiprocessing over huge files
    • Compressed files
  • Flags
    • Supported flags
    • Rust-vs-Python divergences
      • re.ASCII
      • re.LOCALE
      • re.DEBUG
    • Inline directives
  • Migrating from 1.x to 2.0
    • Minimum Python 3.9
    • multiline=True is now the default
    • num_lines=N is now max_span_lines=N
    • search() in window mode now returns the first match
    • Match.groups now contains None for non-participating groups
    • Flag changes
    • New: finditer, match, and compile
    • Streaming \r\n handling

API reference

  • Module-level functions
    • file_re_cls
      • file_re_cls.search()
      • file_re_cls.match()
      • file_re_cls.findall()
      • file_re_cls.finditer()
      • file_re_cls.compile()
  • Pattern
    • Pattern
      • Pattern.__init__()
      • Pattern.pattern
      • Pattern.flags
      • Pattern.search()
      • Pattern.match()
      • Pattern.findall()
      • Pattern.finditer()
      • Pattern.__repr__()
  • Match
    • Match
      • Match.__init__()
      • Match.span()
      • Match.start()
      • Match.end()
      • Match.group()
      • Match.groups()
      • Match.groupdict()
      • Match.__repr__()
file_re
  • Index

Index

_ | C | E | F | G | M | P | S

_

  • __init__() (file_re.Match method)
    • (file_re.Pattern method)
  • __repr__() (file_re.Match method)
    • (file_re.Pattern method)

C

  • compile() (file_re.core.file_re_cls static method)

E

  • end() (file_re.Match method)

F

  • file_re_cls (class in file_re.core)
  • findall() (file_re.core.file_re_cls static method)
    • (file_re.Pattern method)
  • finditer() (file_re.core.file_re_cls static method)
    • (file_re.Pattern method)
  • flags (file_re.Pattern property)

G

  • group() (file_re.Match method)
  • groupdict() (file_re.Match method)
  • groups() (file_re.Match method)

M

  • Match (class in file_re)
  • match() (file_re.core.file_re_cls static method)
    • (file_re.Pattern method)

P

  • Pattern (class in file_re)
  • pattern (file_re.Pattern property)

S

  • search() (file_re.core.file_re_cls static method)
    • (file_re.Pattern method)
  • span() (file_re.Match method)
  • start() (file_re.Match method)

© Copyright 2026, file_re contributors.

Built with Sphinx using a theme provided by Read the Docs.