I want to match shop name from a url .Please see the example below. Its for url redirection in a word press application.

See the examples given below


In all cases i need to get only awok from the url .It will be the text coming after ‘-‘ and before query string .

I tried below and its not working

/outlets/(d+)-(.*)? => /shop/$2

Any help will be greatly appreciated.

Read more here: Regular expression to match string from url


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: