Run ❯
Get your
own Python
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
import re txt = """Hi my name is Sally""" #Search for a sequence that starts with "me", followed by one character, even a newline character, and continues with "is": print(re.findall("me.is", txt, re.DOTALL)) #This example would return no match without the re.DOTALL flag: print(re.findall("me.is", txt)) #Same result with the shorthand re.S flag: print(re.findall("me.is", txt, re.S))
['me\nis']
[]
['me\nis']