-
-
Save akhilrs/8e6eb55b33347267865f9cb3a1552808 to your computer and use it in GitHub Desktop.
quick and dirty wordpress slug generator in excel for data import from an existing database.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=LOWER(CLEAN(SUBSTITUTE(TRIM(C2)," ","-"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It obviously depend on your slug algorithm. However in google spreadsheet you can use
=LOWER(SUBSTITUTE(REGEXREPLACE(REGEXREPLACE(TRIM(C2),"[^a-zA-Z0-9\s]",""),"\s{2,}"," ")," ","-"))
In Excel you will have to implement REGEXREPLACE as a macro (it should not be too difficult)