binaryninja.re.Pattern

class Pattern

Compiled regular expression object.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

findall

Return a list of all non-overlapping matches of pattern in string.

finditer

Return an iterator over all non-overlapping matches for the RE pattern in string.

fullmatch

Matches against all of the string.

match

Matches zero or more characters at the beginning of the string.

scanner

search

Scan through string looking for a match, and return a corresponding match object instance.

split

Split string by the occurrences of pattern.

sub

Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.

subn

Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl.

Attributes

flags

The regex matching flags.

groupindex

A dictionary mapping group names to group numbers.

groups

The number of capturing groups in the pattern.

pattern

The pattern string from which the RE object was compiled.