I have to write a program to search through a file containing lines and find lines that match to a degree of tolerance but are not necessarily the same. So for example the following lines would match:[Concern] server=x814 process_manager=q5 trade_portal_3 is not responding[Critical] server=y773 process_manager=q2 fix_portal_2 is not respondingThe point is to identify groups of similar messages. However the processing code must be completely agnostic so a simple reg-exp such as the following would not fit the bill:\[\w+\] server=\w+ process_manager=\w+ \w+ is not respondingI'm assuming that what I need is some kind of tokenising / scoring / diffing algorithm, but I'm not sure whether to attack this myself or whether there's something available that will help me with this or whether another approach would be more appropriate.I've tagged this question with C#, C++ and Python as I'm still open to how this is achieved, but I'm mostly interested in the approach. Thanks.
Matching groups of similar lines on a generic matching algorithm
c#;c++;python;parsing;regular expressions