pandas.Series.str.match

Series.str.match(self, pat, case=True, flags=0, na=nan)[source]

Determine if each string matches a regular expression.

Parameters
patstr

Character sequence or regular expression.

casebool, default True

If True, case sensitive.

flagsint, default 0 (no flags)

Regex module flags, e.g. re.IGNORECASE.

nadefault NaN

Fill value for missing values.

Returns
Series/array of boolean values

See also

contains

Analogous, but less strict, relying on re.search instead of re.match.

extract

Extract matched groups.