Using the indexOf
function, how can I get a positive result when searching an array for a wildcard card match such as the below? All I am currently getting is a negative result: (-1)
function test() {
var arr = ["OTHER-REQUEST-ASFA","OTHER-REQUEST-ASFB","OTHER-REQUEST-ASFC"]
var a = arr.indexOf("ASFB")
alert(a)
}