mardi 28 février 2017

Regex Expression simple rewrite

I am implementing a rewrite rule, that will be used when a user navigates to the following.

domain/distributor_search

or

domain/distributor_search/page-2, 3, 4 etc.

This is my RegEx

This expression is broken up by the or operator

find word distributor_search with no white space after

or

Find any word with page-num

\b\Wdistributor_search\b\s|\b(\/page-[0-9]*)\b

the page-num expression works fine but find word distributor_search does not




Aucun commentaire:

Enregistrer un commentaire