[Bro-Dev] #422: Array-style index accessor for strings

Bro Tracker bro at tracker.bro-ids.org
Thu Dec 20 15:27:13 PST 2012

#422: Array-style index accessor for strings
  Reporter:  seth             |      Owner:
      Type:  Feature Request  |     Status:  new
  Priority:  Normal           |  Milestone:  Bro2.2
 Component:  Bro              |    Version:
Resolution:                   |   Keywords:  language

Comment (by jsiwek):

 In [55c515d50a29fffc9748eb847b16d9b92b8b0017/bro]:
 #!CommitTicketReference repository="bro"
 Add array-style index accessor for strings.  Addresses #422.

 The index expression can take up to two indices for the start and end
 index of the substring to return (e.g. "mystring[1,3]").  Negative
 indices are allowed, with -1 representing the last character in the
 string.  The indexing is not cyclic -- if the starting index is >= the
 length of the string an empty string is returned, and if the ending
 index is >= the length of the string then it's interpreted as the last
 index of the string.  Assigning to substrings accessed like this isn't

Ticket URL: <http://tracker.bro-ids.org/bro/ticket/422#comment:2>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker

More information about the bro-dev mailing list