in reply to simple search in a file
That should work. Perhaps the lines don't all contain two tabs? Why not try something a little more robust like
instead. You really shouldn't need to capture anything with parens and you might consider using \Q and \E to quote the metachars in your variables otherwise the dots in your IPs will match any character at all./$ip\s+$date/;
Also, make sure your variables hold what you expect. If you are reading them from a file, for instance, be sure they don't contain newlines.
-sauoq "My two cents aren't worth a dime.";
|
|---|