Location is a request URI or valid PCRE regular expression to match against. If location is a standard URI (not regular expression), it must start with a slash / . The maximum length of the location is 255 characters.

For regular expressions, there is a great tester at http://rubular.com and also a nice visualization tool http://www.regexper.com.