Msg#: 4494871 posted 4:55 am on Sep 14, 2012 (gmt 0)
you can group something in your pattern by surrounding it with parentheses. when something is captured in a group it can be reused by referring back to it with a variable in the substitution.
Back-references are identifiers of the form $N (N=0..9), which will be replaced by the contents of the Nth group of the matched Pattern.: http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriterule