In the world of data transformation/migration is the most common thing (in my case) is data verification and text comparison. Usually, there is source and target value and some logic in the background.
Mostly used string operations by me:
- remove spacesremove all spacesremove special characterscase insensitive
The function:
function removeSpecialChars(str) { return str.replace(/(?!\w|\s)./g, '') .replace(/\s+/g, ' ') .replace(/^(\s*)([\W\w]*)(\b\s*$)/g, '$2') .replace(/ /g,'') .toLowerCase(); } Do you need help with data migration/integration/transformation? Let us know.
