[fix for case 9017] Rewrote regular expression
[case 9017] Updated unit tests