Last active
April 20, 2020 01:24
-
-
Save DevEarley/c7499c8cc583baa917d29f7bc8d727b0 to your computer and use it in GitHub Desktop.
RegEx for matching lower case values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.filteredItems = this.listOfItems.filter(textToMatch => { | |
let regExMatch = new RegExp(sourceText.toLowerCase(), "g"); | |
const result = textToMatch.toLowerCase().match(regExMatch) | |
return result != null && result.length > 0; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment