[Bro] str_split

Vern Paxson vern at icir.org
Wed May 28 22:23:45 PDT 2008


Given Christian's follow-on note, this might not be apt.  But from
your original description, it sounds like split_all() will do the
trick.  For example,

	split_all("foobar", /./)

yields the table[count] of string:

	{
	[10] = a,
	[6] = o,
	[11] = ,
	[7] = ,
	[4] = o,
	[1] = ,
	[9] = ,
	[3] = ,
	[5] = ,
	[8] = b,
	[12] = r,
	[2] = f,
	[13] = 
	}

which is enough to then iterate over each character.

		Vern



More information about the Bro mailing list