1# You can do this with Reg Exp
2import re
3
4s = 'asdf=5;iwantthis123jasd'
5result = re.search('asdf=5;(.*)123jasd', s)
6print(result.group(1))
1import re as regex
2
3s = 'asdf=5;iwantthis123jasd'
4result = regex.match('asdf=5;(.*)123jasd', s)
5
6print(result)