0

I want to get from f all the 11 characters that will always start with AL0 plus 8 digits. I tried the following but is not working properly

import re

p=r"AL0\d{8}"

f= "take this one AL012345678 , not this one fAL012345670 , nor AL0123333333311, nor AL012345679f ,but also AL012345555."

m=re.findall(p,f)

print (m)
Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563
Federico Sanchez
  • 145
  • 1
  • 2
  • 12

0 Answers0