The goal is to clean up a character string and delete elements not important for the user and SEO ie the (letter before the apostrophes) in my case. I would mainly like a solution or an explanation of a regex that would do that in PHP but the logic is no different in JS.
character string : .../mode-d'emploi/...
Become:
url: /mode-emploi/slug-34
Maybe someone can help me.