Normally you could use a capturing group defined by the expression in the parentheses to capture the matched characters. Here's an example:
regexp -inline {test([0-9]} "test321654654" original match
$original would be set to the original string of test321654654 and $match would be set to 321654654. See the TCL wiki page for regexp for details: http://www.tcl.tk/man/tcl8.4/TclCmd/regexp.htm
In your example, matches_regex doesn't support saving the matches. And it's much more efficient to use a string function to do the HTTP path checking anyhow.
Aaron