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
  • 561,645
  • 34
  • 376
  • 476
Federico Sanchez
  • 145
  • 2
  • 11

0 Answers0