I am trying to parse a complete url of a video using regular expression for retrieving the video_id from it.I am using the correct pattern but just want to retrieve the matched string rather than replacing it.How can I do that please help !
Reported on Movable Type 5

Reverse your expression: match everything that doesn't match the string you want, and replace that with nothing. Something like:
regex_replace="/^.*?(thestuffyouwant).*?$/","\1"
Maarten,
Should the last part of that be "$1" not "\1"?
Thanks Maarten and Mike for the help!.I was trying to parse a video_id from youtube video url and finally it was done using regex_replace="/^[^v]+v.(.{11}).*/","$1"