You can use GB(\s?\d){9}
GB
matches the characters GB literally (case sensitive)
1st Capturing Group (\s?\d){9}
{9}
Quantifier — Matches exactly 9 times
A repeated capturing group will only capture the last iteration. Put a capturing group around the repeated group to capture all iterations or use a non-capturing group instead if you're not interested in the data
\s?
matches any whitespace character (equal to [\r\n\t\f\v ]
)
?
Quantifier — Matches between zero and one times, as many times as possible, giving back as needed (greedy)
\d
matches a digit (equal to [0-9]
)
test it yourself