[Bro] Bro regex documentation

sridhar basam sri at basam.org
Fri Jan 21 07:34:36 PST 2011


On Fri, Jan 21, 2011 at 10:20 AM, Seth Hall <seth at icir.org> wrote:

>
> On Jan 21, 2011, at 10:04 AM, sridhar basam wrote:
>
> > Yeah, those can be used together to see what i want. Wanted to see if
> there was something similar to the match function in gawk where the function
> returns an array of all of the variables you collect in your pattern. I
> didn't see anything like it.
>
> The match function in gawk only seem to return the position of the
> beginning of the match?
>
>
The match function will also return substrings from your regex pattern and
return it in an array if you provide the optional 3rd parameter. So if you
do match(input, /a=(.+) b=(.+) c=(.+)/, ret), you will get the values you
want in the array ret. I think with what you pointed out for split functions
i should be able to get what i need though.

thanks,
              Sridhar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20110121/95428c06/attachment.html 


More information about the Bro mailing list