Searching for documentation covering the regex characters Ansible uses

I’m trying to find a list of all regex characters Ansible uses in its definitions.

For example, the in the files module, the blockinfile definition has an insertafter parameter that accepts regex instead of ‘EOF’ but I don’t see what type of regex is available or employed for word matching or substitution or how its defined.

It's Python
https://docs.python.org/2/library/re.html