Advertisement
kabads

python re findall failing

Dec 16th, 2023
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. >>> import re
  2. >>> searchstr = re.compile(r'one|two|three|four|five|six|seven|eight|nine')
  3. >>> mystring = "onetwonej"
  4. >>> re.findall(searchstr, mystring)
  5. ['one', 'two']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement