Use regular expressions for powerful string matching and manipulation.
Source Code
import re
pattern = re.compile(r'bfoob')
matches = pattern.findall('foo bar (foo) bar foo-bar foo_bar')
for match in matches:
print("Found:", match)
Use regular expressions for powerful string matching and manipulation.
import re
pattern = re.compile(r'bfoob')
matches = pattern.findall('foo bar (foo) bar foo-bar foo_bar')
for match in matches:
print("Found:", match)