[Bro-Dev] [JIRA] (BIT-1042) Caret in regex pattern doesn't match start of line
Bernhard Amann (JIRA)
jira at bro-tracker.atlassian.net
Thu Jul 25 07:52:04 PDT 2013
[ https://bro-tracker.atlassian.net/browse/BIT-1042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13314#comment-13314 ]
Bernhard Amann edited comment on BIT-1042 at 7/25/13 9:50 AM:
--------------------------------------------------------------
split_all basically applies the regular expression multiple times on smaller-growing portions of the string until there is nothing left to match.
So it works as expected. To just get the first match use split1
was (Author: amannb):
split_all basi
> 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: Bug
> Components: Bro
> Affects Versions: 2.1
> Environment: Ubuntu 12.04 and 13.04. Dependencies from apt-get ubuntu repos only.
> Reporter: Brian Little
> Priority: Normal
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://bro-tracker.atlassian.net/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the bro-dev
mailing list