On Tue, 18 Feb 2014, Marc Perkel wrote:
Trying to do something complex and not sure how it's done. What I'm looking
for is to combine 2 conditions in a single regular expression so that both
have to be true for a match. Yes - I know I can make 2 SA rules and combine
them but I bet there's a way to do it in one expression. For simplicity
here's the challenge.
A chuck of text has to include the word "cat" 5 time and the word "dog" 4
times to be a match. How do you do that?
I assume there must be no restrictions on the order the occurrences
appear? That makes it rather difficult, and thus expensive.
Two individual simple "tflags multiple maxhits=N" REs and a meta to
combine them would be much more efficient than a single RE. Is this just
an intellectual exercise, and/or something not limited to the SA
environment?
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhar...@impsec.org FALaholic #11174 pgpk -a jhar...@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
You do not examine legislation in the light of the benefits it
will convey if properly administered, but in the light of the
wrongs it would do and the harms it would cause if improperly
administered. -- Lyndon B. Johnson
-----------------------------------------------------------------------
4 days until George Washington's 282nd Birthday