Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- How to apply combinations in one rule?


lucy24 - 8:53 pm on Jan 2, 2013 (gmt 0)


the back references ($1, $2 etc.) would change

Back references look at definitions, not captures. So

(stuff)?(morestuff)?(stillmorestuff)?

should always come through as $1$2$3 even if the content of some captures is null. The tricky part in this one was nesting:

(?:blah-(capture))?(?:-moreblah-(morecapture))?

and so on.


Thread source:: http://www.webmasterworld.com/apache/4532500.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com