Is it better to wrap all node with methods, or use regular expression to manipulate? I think we should use best tools case by case. - http://www.codinghorror.com/blog/archives/000617.html Matching Wildcards: An Algorithm - http://www.ddj.com/architect/210200888?pgno=1 Generic Text Comparison Tool with LCS Approach - http://www.javacodegeeks.com/2012/05/generic-text-comparison-tool-with-lcs.html