/B(\d+)\[(\d+)\]$/
B matches the character B literally (case sensitive)
1st Capturing group (\d+)
\d+ match a digit [0-9]
Quantifier: + Between one and unlimited times, as many times as possible, giving back as needed [greedy]
\[ matches the character [ literally
2nd Capturing group (\d+)
\d+ match a digit [0-9]
Quantifier: + Between one and unlimited times, as many times as possible, giving back as needed [greedy]
\] matches the character ] literally
$ assert position at end of the string
MATCH INFORMATION
https://regex101.com/