I have the following example of a string with regex which I am trying to match:
Regex: ^\\d{3}( [0-9a-fA-F]{2}){3}
^\\d{3}( [0-9a-fA-F]{2}){3}
String to match: 010 00
010 00
This should work for your current string. I'd need a better example (more strings etc.) to see if this would break for those. The word boundary (\b) checks for any non-word character:
\b[0-9a-fA-F]{2}\b