Update string matching/sanitization needs improvement
Right now there are two clunky regexes that are used to filter out non-update lines. These will require maintenance going forward to match on new update types/sources. Instead, perhaps there is a better pattern to use that I didn't catch when I first set these up.
Testing different approaches to abstract the bulk of the logic out into the sanitize_string() function.
I have a working sanitize_string() function that handles input from calculate_updates_via_apt() and calculate_updates_via_yum() without requiring a lot of preprocessing.
Incorporated changes tested within massage_output.sh:
- Better documentation
- Beefed up transformation of strings to make them more readable (tested on Ubuntu 10 and CentOS 5.x)
- Removed old 'UP2DATE_MATCH_ON' and 'YUM_MATCH_ON' regexes now that massage_string() has been enhanced