Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python how to extract a string from another string

import re

text = 'gfgfdAAA1234ZZZuijjk'

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

# found: 1234
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #extract #string #string
ADD COMMENT
Topic
Name
6+7 =