The problem is the first line of your function. By cutting spaces from the target line, you allow false positives.
Will CF47OHW match [AZ] {1,2} [0-9] {1,2}? [0-9] [AZ] {2}
CF matches [AZ] 4 matches [0-9]{1,2} (blank) matches \s? 7 matches [0-9] OH matches [AZ]{2} W gets discarded
So, as Halfgrave said, adding the start and end characters (^ and $) will fix it.
At this point, can you also remove \ s? a bit from the middle of your regular expression.
But! Despite fixing the error, your regular expression will still not work the way you would like. You should look at the following pretty good answer on this Regex (comprehensive) site in the UK
source share