When dealing with RegEx in .NET I have two options:
Check string for pattern match:
<a ([^>]*?)href=\"http://the.site.com/photo/[0-9]*\">
Capture a part of pattern:
<a ([^>]*?)href=\"http://the.site.com/photo/(?<photoname>.*?)\">
But what if I want to check for pattern match AND capture a part if it matches with single RegEx?