Remove regex class and merge functions with str