# Regex do not match

**URL:** <https://www.ruby-forum.com/t/regex-do-not-match/212977>\
**Category:** NGINX\
**Created:** [October 19, 2011, 6:08pm UTC](https://www.ruby-forum.com/t/regex-do-not-match/212977 "2011-10-19T18:08:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [October 19, 2011, 6:08pm UTC](https://www.ruby-forum.com/t/regex-do-not-match/212977/1 "2011-10-19T18:08:22Z")

</div>

Hello, can someone please help me and tell me why this regex

location ~ /(._)/wp-content(/._) {  
[…]  
}

does not match this URL  
[http://www.mysite.com/mydir/wp-content/my\_image/foo.jpg](http://www.mysite.com/mydir/wp-content/my_image/foo.jpg) ?

I just have this other directive in the server section

location / {  
[…]  
}

Thanks

–  
Simone
