Changed to use regex expressions