Re: непонятки с rewrite, нужна помощь

Igor R im at kaba.org.ua
Fri Mar 27 00:30:39 MSK 2009


On Thu, 26 Mar 2009 23:15:01 +0300, Igor Sysoev <is at rambler-co.ru> wrote:
> On Thu, Mar 26, 2009 at 10:01:22PM +0200, Igor R wrote:
> 
> 
> - "^/(\d{1,3})/(\d{1,3})/([er])/([a-zA-Z\d_.-]+)?/$"
> + "^/(\d{1,3})/(\d{1,3})/([er])/([a-zA-Z\d_.-]+)?$"
> 
> $pcretest 
> PCRE version 7.6 2008-01-28
> 
>   re> #^/(\d{1,3})/(\d{1,3})/([er])/([a-zA-Z\d_.-]+)?/$#
> data> /103/77/e/100_Natural_Wonders2_0__1.jpg
> No match
> data> ^D
> $pcretest 
> PCRE version 7.6 2008-01-28
> 
>   re> #^/(\d{1,3})/(\d{1,3})/([er])/([a-zA-Z\d_.-]+)?$#     
> data> /103/77/e/100_Natural_Wonders2_0__1.jpg
>  0: /103/77/e/100_Natural_Wonders2_0__1.jpg
>  1: 103
>  2: 77
>  3: e
>  4: 100_Natural_Wonders2_0__1.jpg
> data> ^D
> 
> А [a-zA-Z\d_.-] можно заменить на [\w\d.-]

Спасибо, все заработало. Утилита pcretest -
руль :)

--
Best regards,
IR12-RIPE
RIV-UANIC





More information about the nginx-ru mailing list