I have a string like:
Location: FD130 New York GA Unit Serial Purchase Order Sales Order Make Model Amount Tax Total 12345566 Location: FD130 Roswell GA Unit Serial Purchase Order Sales Order Make Model Amount Tax Total 0130029964
When i trying regex like to get the location of specified serial no.(34573).
Regex: 'Location:(.*)?Unit(.*?)0130029964
Then it giving the whole string string with location and ending with 34573.
The expected output is FD130 New York GA
when i pass 0130029964
serial id.
Is there any function in python for getting the first backward sub-string location
from given serial no.