4 ms·
But the author doesn't even advocate RegEx for testing if a string is a palindrome. He doesn't explain for which part he'd use it, but from the sound of it, rem
by iSnow 10y ago
But the author doesn't even advocate RegEx for testing if a string is a palindrome. He doesn't explain for which part he'd use it, but from the sound of it, removing whitespace and punctuation.
- judahmeek 10y agoThat's right. If you look at the code, the only use of regex is to remove all characters not matching [a-z0-9].