Answers for "python get words between two words"

0

python get words between two words

# credit to the Stack Overflow user in the source link
import re

text = 'gfgfdAAA1234ZZZuijjk'

m = re.search('AAA(.+?)ZZZ', text)
if m:
    found = m.group(1)

# found: 1234
Posted by: Guest on September-21-2021

Code answers related to "python get words between two words"

Python Answers by Framework

Browse Popular Code Answers by Language