I am trying to count matching regex
in a column and print out the amount found, the code below keeps giving me 0. I have a feeling it's not iterating through the whole column? My code is as below.
import re
pattern = ('/^[A-Z]{1}\d{8}$/i')
numbers = jan_df['Student Number']
iterator = re.finditer(pattern, str(numbers))
count = 0
for match in iterator:
count+=1
print(count)