replace re_search by regexec: re_search is not standard and actually not defined on OSX