|I agree with Peter_in_2780 that you should separate the matching of the number and the validation calculation.
Just create two methods, one where you check the format and the other to calculate and validate the check digit.
You didn't specify any variants of the text you want to match, so I just guessed what it could look like.
For the actual regular expression you could do like this:
Input: TFN '123456782'
It will get these variants:
TFN'123 456 782'
TFN 123 456 782
^ Start of the string
$ End of the string
\s* Consumes 0 or more white space characters. It will make sure you match TFN123 and TFN 123
(')? Optional quotation mark
(?<number> ...) Named group, makes it easier to extract the actual number
If necessary, you will have to remove the spaces in a second step.
Hope it helps.