From 4b130663693107948f5e7f9ea2e9a414af1363fb Mon Sep 17 00:00:00 2001 From: Babatunde Alli Date: Fri, 28 Jan 2022 18:23:16 -0500 Subject: [PATCH] Improve the readability of the RegExp --- palindromes/palindromes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/palindromes/palindromes.js b/palindromes/palindromes.js index 19b6aa8..0023222 100644 --- a/palindromes/palindromes.js +++ b/palindromes/palindromes.js @@ -1,5 +1,5 @@ const palindromes = function(string) { - processedString = string.toLowerCase().replace(/[^A-Za-z]/g, ""); + processedString = string.toLowerCase().replace(/[^a-z]/g, ""); return ( processedString .split("")