How can I strip everything leading up to a number? Of course this would have to work for any number, not just 1.
I would like
blahblahblah 1 main street
1 main street
You can use the
sub function to replace all non-numerical characters from the left side.
import re s = 'blahblahblah 1 main street' re.sub(re.compile(r'^[^0-9]*'), '', s) #Outputs '1 main street'