0

Hi all,

i was trying to create a URL rewrite regex.

The regex is something similar to this:
\/pa\/([0-9,a-z,A-Z,-])

This regex works fine but i want to make this regex more dynamic so instead of "pa" i want that it matches any characters a user inputs.

I create a regexr test so you may understand better what i mean, link is: http://gskinner.com/RegExr/?368a2

2
Contributors
2
Replies
8
Views
4 Years
Discussion Span
Last Post by domingo
0

What do you mean by any character?

.*      everything
[^\/]*  anything but a slash
\w+     at least one word character including digits and underscores
\w\w    exactly two
0

i mean that the first element between the slash (/pa/) can be /ps/ /pt/ or any other word

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.