The regex foo/(\w*)/bar
matches the string foo/123/bar
.
This is probably something basic that I've missed about regexes, but often I only want to retrieve the substring between the slashes. Is there a simple .NET API I can use without having to access the groups collection? Or an alternative way of writing the regex?
Thanks!