I'm on react and i'm working on a input that display Url path like wordpress page title, you put a title in the input and it display the path of the page onBlur...
I managed to do the whole thing but i still need a custom regex to display the Url for the value of the input:
using (.replace())
- I need to trim the white space at the end and at the beginning
- replace all the white space by ('-') but prevent from having 2 in a row
- replace the specials characters by ('-')
- replace letters like ç ñ ö é ì .etc by c n o e i
is there someone who can help me with that?