开发者

Regular expression to allow for number values between 1-3 digits?

RewriteRule ^gallery/[0-9][0-9][0-9]/$ index.php?gallery_id=$1

It allows for any number that i开发者_JAVA百科s three digits in length. I do not know how to allow for less than three digits as well (or more than three for that matter).


You want to do something along the lines of

[0-9]{1,3}

There are some excellent examples here. Scroll down to nearly the bottom of the page, there are examples of how the various range selections (not the right term for them) work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜