Last active
December 23, 2015 10:09
-
-
Save jershmagersh/6619272 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void DB::search(string &currLine) | |
{ | |
smatch result; | |
ofstream outfile; | |
regex_search(currLine, result, *globalMatchBlock); | |
for(int i = 0; i < result.size(); i++){ | |
if(result[i].length() > 2 && i != 0) { | |
outfile << "Match: " << (*rulesVec)[i-1].alert << endl; //Access alert in vector at that index, since that's the one that matched... | |
outfile << "From: " << result[0] << endl << endl; | |
outfile.flush(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment