v Match Any Character - Regex

Match Any Character

Based on: Regular Expressions Cookbook


# Load regex package
import re

Create some text

# Create a variable containing a text string
text = 'The quick brown fox jumped over the lazy brown bear.'

Apply regex

# Find anything with a 'T' and then the next two characters
re.findall(r'T..', text)