patchText() bug fixes and support for more unicode

- Fixed a bug in patchText() where occurrences of empty find results
created an extra whitespace.
- Added more unicode character support with regex in patchText() and
valid()