Refactored match, replace and transform logic out of SubstringLabeler and SubstringReplacer

git-svn-id: https://svn.cms.waikato.ac.nz/svn/weka@10383 e0a1b77d-ad91-4216-81b1-defd5f83fa92
Refactored match, replace and transform logic out of SubstringLabeler and SubstringReplacer

git-svn-id: https://svn.cms.waikato.ac.nz/svn/weka@10384 e0a1b77d-ad91-4216-81b1-defd5f83fa92