From: Mark M. <mo...@oc...> - 2010-01-26 17:45:19
|
Dear cclib developers, Have you thought of using a more robust representation of what to match than regular expressions? The cclib-Bugs-2939920 is an example of why regular expressions are not the best way to go. I have written my own GAMESS parsing library using a combination of regular expressions and the pyparsing library. The regular expressions are used to extract blocks of text from a GAMESS output file. Then pyparsing is used to extract the data I need from those blocks. Pyparsing is slow compared to regular expressions, but far easier to use and specify what you want to match. By extracting and processing meaningful blocks of text, like the HESS-END block in a GAMESS dat file, you can then use pyparsing to easily extract the data you want. Mark |