nagif Posted November 25, 2022 Share Posted November 25, 2022 Hello, I am trying to create a slug from a text value. Take for example a blog post titled: This is My Blog Title!!! The slug should be something like this-is-my-blog-title Space and punctuation are stripped out. I’m trying to use regex to make this happen. Here is where I got so far. First I’m making the entire string lowercase Find and replace! with null space Find and replace with regex expression [^0-9a-zA-Z]+ The issue I’m running into is that I still end up with the “-” at the end of the slug. Does anyone have experience with this sort of issue? Link to comment Share on other sites More sharing options...
nagif Posted November 25, 2022 Author Share Posted November 25, 2022 Just now, nagif said: Hello, I am trying to create a slug from a text value. Take for example a blog post titled: This is My Blog Title!!! The slug should be something like this-is-my-blog-title Space and punctuation are stripped out. I’m trying to use regex to make this happen. Here is where I got so far. First I’m making the entire string lowercase Find and replace! with null space Find and replace with regex expression [^0-9a-zA-Z]+ The issue I’m running into is that I still end up with the “-” at the end of the slug. Does anyone have experience with this sort of issue with Conert Text into slug by spytools? thanks for any hep Link to comment Share on other sites More sharing options...
SkriptUser103 Posted November 26, 2022 Share Posted November 26, 2022 @nagif is regex that thing that makes ur ping lower Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now