# Ngx\_lua location capture issue

**URL:** <https://www.ruby-forum.com/t/ngx-lua-location-capture-issue/212942>\
**Category:** NGINX\
**Created:** [October 18, 2011, 6:55pm UTC](https://www.ruby-forum.com/t/ngx-lua-location-capture-issue/212942 "2011-10-18T18:55:24Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Nginx\_U](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/dec6dc/32.png) [@Nginx\_U](https://www.ruby-forum.com/u/Nginx_U)\
**Post date:** [October 21, 2011, 4:06pm UTC](https://www.ruby-forum.com/t/ngx-lua-location-capture-issue/212942/21 "2011-10-21T16:06:41Z")

</div>

On 21 October 2011 07:08, agentzh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Fri, Oct 21, 2011 at 12:02 AM, Nginx U. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > On 20 October 2011 14:48, agentzh [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:  
> > Take this regex for example: (?:^\>[\w\s]\*\</?\w{2,}\>)
> 
> Good lord!
> 
> Why are you using “^” here? Are you meant to match from the very start  
> of your $request\_uri string?  
> Very start of GET Arg, Yes … It searches for an injection attempt.  
> [ngx\_lua location capture issue](http://mailman.nginx.org/pipermail/nginx/2011-October/029901.html)

Thanks for your help.  
Enjoying my journey through ngx\_lua!

---

<div class="post-metadata">

**Author:** ![Nginx\_U](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/dec6dc/32.png) [@Nginx\_U](https://www.ruby-forum.com/u/Nginx_U)\
**Post date:** [October 21, 2011, 4:27pm UTC](https://www.ruby-forum.com/t/ngx-lua-location-capture-issue/212942/22 "2011-10-21T16:27:45Z")

</div>

On 21 October 2011 17:00, Nginx U. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have since moved on to …
> 
> local args = ngx.req.get\_uri\_args()  
> for key, val in pairs(args) do  
> if type(val) == “table” then  
> my\_arg = table.concat(val, ", ")  
> else  
> my\_arg = val  
> end  
> if my\_arg then

- 

```
           if my_arg then

```

- 

```
           if my_arg and type( my_arg ) ~= "boolean" then

```

[Previous page](https://www.ruby-forum.com/t/ngx-lua-location-capture-issue/212942.md?page=1)
