Add slug_to_pcre pattern function