Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quantifiers limit

import re

strings = (
    "axxxa",
    "axxxxa",
    "axxxxxa",
)

for text in strings:
    match = re.search(r'ax{4}', text)
    if match:
        print(f"Match {text}")
        print(match.group(0))
    else:
        print("NOT Match")