findRegexReplaceMatch ignores empty strings and added tests