I need a simple wildcard pattern matching function written in JS. I
have wrestled with regular expresions but frankly am struggling to come
up with anything less than an epic function of many lines of code ...
Any help much appreciated!
Sample string :
"the cat sat on the mat"
matches :
"the cat*" , "*cat*" , "*the mat"
no matches :
"the cat", "cat", "the mat"
have wrestled with regular expresions but frankly am struggling to come
up with anything less than an epic function of many lines of code ...
Any help much appreciated!
Sample string :
"the cat sat on the mat"
matches :
"the cat*" , "*cat*" , "*the mat"
no matches :
"the cat", "cat", "the mat"
Comment