Regular expression parenthesised groups

Hi, is there a way to capture groups as part of a regular expression using parentheses in a Bro
script? For example, to extract the value of a query string variable in a URI - /foo=([^&]*)/ - I
just want the value in the parentheses.

If not I guess I can do this with the sub and split functions in a way similar to
http://stackoverflow.com/questions/10126956/capture-value-out-of-query-string-with-regex but I just
thought I'd ask.

Thanks,

Sorry, we don't have group capturing in our regular expressions. Here's an example where I've used a split function to achieve a similar result...

https://github.com/bro/bro/blob/master/scripts/base/utils/paths.bro#L34

.Seth

Thanks Seth. I did manage to get it working using split.