Skip to content

re module: search() vs. match() section should mention fullmatch() #98906

Closed
@pekkaklarck

Description

@pekkaklarck

The docs at https://docs.python.org/3/library/re.html#search-vs-match start with

Python offers two different primitive operations based on regular expressions: re.match() checks for a match only at the beginning of the string, while re.search() checks for a match anywhere in the string (this is what Perl does by default).

but there has been re.fullmatch() since Python 3.4. I believe the third method should be mentioned and should get its own examples as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions