Created
April 29, 2015 09:35
-
-
Save steve-codemunkies/7e99bedabc058bae4401 to your computer and use it in GitHub Desktop.
This file contains 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
var regexp = /ste/ig; | |
var names = ['John Smith', 'Steven Hocking', 'Robert Stevenson', 'Steve Hocking', 'Janet Smith']; | |
var filtered = names.filter(function(name) {return regexp.test(name);}); | |
console.log(filtered.toString()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment