added possibility to use regex to remove unneeded chars