I'm trying to search a specified range of numbers and I'm currently using regular expressions. The lines I'm searching contain numbers from 00 to 30, but I only want to find the lines containing 02 to 22.
I have tried a few different things, but none of them work.
this returns 00 to 29
findRange = re.search('[0-2][0-9]', line)
this just doesn't work
findRange = re.search('[02-22]', line)
I know I could do this, but I'm hoping there's a cleaner way.
findRange = re.search('(02|03|04...', line)
Thanks.