Unit test fix

Gentleman minor change.
Scott await your feedback on the regular expression part (optimisation)