Python regex split, integer of arbitrary length
python, regex
Solution
You can't use `split()` since that has to consume some characters, but you can use normal matching to do it.
>>> import re
>>> r = re.compile(r'(\D+)(\d+)')
>>> r.match('abc444').groups()
('abc', '444')
Problem
I'm trying to do a simple regex split in Python. The string is in the form of FooX where Foo is some string and X is an arbitrary integer. I have a feeling this should be really simple, but I can't quite get it to work. On that note, can anyone recommend some good Regex reading materials?