Use regular expression matching whenever possible