Added configurable regular expression to slugify method