Hey so im new to Regex but what im basically trying to do is have the user input a path and just check if my current string contains any matching paths. So for example
Paths = "/cookie /cookie/iceCream /"
rexexInput = "/coo"
if(paths.match(regexInpute))
//do something
end
so basiaclly just checking if the user input path is contained within the string
Aucun commentaire:
Enregistrer un commentaire