changed custom code to boost regex