Handle boost regular expression errors