use regex instead of startsWith, refs #688
(cherry picked from commit e69a69407778d4824e8dcb9a975e6238805266f7)