use struc with private fileds for Regex, implement destructor