Hi
I'm spending too much time in trying to fing how to get the number between 'BEGIN' and 'END' using a pure regex: what is the correct syntax to say 'ignore up to 'BEGIN/' and get until 'END' ?
(Note the number of slash '/' differs from a case to another, so i'm not interested by 'split')
Thanks
Following trials are incomplete
I'm spending too much time in trying to fing how to get the number between 'BEGIN' and 'END' using a pure regex: what is the correct syntax to say 'ignore up to 'BEGIN/' and get until 'END' ?
(Note the number of slash '/' differs from a case to another, so i'm not interested by 'split')
Thanks
Following trials are incomplete
line = '/blabla/bbbb/llll/aaaa/BEGIN/0555END/lalalalalala' get0 = re.findall(r'.*?(?=BEGIN)', line) get1 = re.findall(r'.*?BEGIN\/', line) get2 = re.findall(r'.*?END\/', line) get3 = re.findall(r'^[.*?BEGIN\/]*(.*)END', line) get4 = re.findall(r'.*!(?=BEGIN)*(.*)END', line)
