[Bro-Dev] [JIRA] (BIT-1042) Caret in regex pattern doesn't match start of line

Seth Hall (JIRA) jira at bro-tracker.atlassian.net
Fri Nov 8 12:10:31 PST 2013


    [ https://bro-tracker.atlassian.net/browse/BIT-1042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14638#comment-14638 ] 

Seth Hall commented on BIT-1042:
--------------------------------

Brian, you can refer to the scripts here: 
   https://github.com/sethhall/bro-junk-drawer/tree/master/domain-tld

There are some examples of dealing with domain names (and I'm avoiding string creation as much as possible which is good for performance).

> Caret in regex pattern doesn't match start of line
> --------------------------------------------------
>
>                 Key: BIT-1042
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1042
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: Bro
>    Affects Versions: 2.1
>         Environment: Ubuntu 12.04 and 13.04. Dependencies from apt-get ubuntu repos only.
>            Reporter: Brian Little
>              Labels: pattern, regex
>         Attachments: caret.bro
>
>
> print split_all("some string", /^t/);
> I would expect it to not match ^t, but it matches any t in the string.
> output:
> {
> [1] = some s,
> [3] = ring,
> [2] = t
> }
> expected:
> {
> [1] = some string
> }
> tested on bro 2.1 and github master 2.1-824



--
This message was sent by Atlassian JIRA
(v6.2-OD-01#6204)


More information about the bro-dev mailing list