Oh yes. About making this work for other types of files: I wouldn't bother until I had a second type to compare. However, it would still be straightforward. Your munging class would have parse() and write methods which would be overridden for each type.
It'd be a bit more difficult if the files could contain more than one kind of line, but the solution I'd use would simply go from a (key,value) pair to a (type, key, value) triple and add another layer to the hash.
In reply to Re^2: complex string matching
by thargas
in thread complex string matching
by freebsdboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |