Created
June 17, 2017 10:27
-
-
Save mahmut-gundogdu/f447db110c15e611d0977f09e41e58c6 to your computer and use it in GitHub Desktop.
regex ile aranan cumleyi & bosluk gibi karakterlerden temizleyip arayan regex paterni
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 param= "mahmut gundogdu";//diye arayınca mahmut gundogdu da mahmut gundogdu da mahmut&gundogdu da gelecek. gelmeli. | |
param = param.replace(/([^a-z|0-9]){1,}/ig, ('([^a-z|0-9]){1,}')) | |
var rx = new RegExp(param, "i") | |
var isMatched = item.match(rx); | |
if (isMatched) { | |
return item; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment