in reply to pattern matching with heuristics

A good starting point could be String::Approx. I have not used it, but the description says it does fuzzy (approximate) string matching.

--ZZamboni