Let\'s say I have a string \'gfgfdAAA1234ZZZuijjk\' and I want to extract just the \'1234\' part.
\'gfgfdAAA1234ZZZuijjk\'
\'1234\'
I only know what will be the few characte
In python, extracting substring form string can be done using findall method in regular expression (re) module.
findall
re
>>> import re >>> s = 'gfgfdAAA1234ZZZuijjk' >>> ss = re.findall('AAA(.+)ZZZ', s) >>> print ss ['1234']