Python regular expression

FB119
how do I match FB and 119s separately?
wrote several kinds of feeling is very tedious, do not know if there is a better way to write.
Thank you.

Jan.17,2022

num = re.search (r'(d) +',''FB119'). Group ()
eng = re.search (r' ([a-zA-Z]) +', 'FB119'). Group ()
) is there a better way to write?


returns a tuple:
clipboard.png


I don't know what you mean. Do you mean "named capture"? For example:

>>> s = 'FB119'
>>> import re
>>> m = re.match(r'(?P<a>[a-zA-Z]+)(?P<b>[0-9]+)', s)
>>> m.group('a')
'FB'
>>> m.group('b')
'119'
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7b18e4-15f3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7b18e4-15f3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?