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
Surprised that nobody has mentioned this which is my quick version for one-off scripts:
>>> x = 'gfgfdAAA1234ZZZuijjk' >>> x.split('AAA')[1].split('ZZZ')[0] '1234'