Is it possible to search for a "+" using the search function in JScript? I am getting ther error message "Unexpected Quatifier" when I try to. So I have this little snippet that shows the problem. The search for an "o" works but the next search does not. I have also used "\+" and that does not work. There is probably a different way to escape the "+" but the documentation seems to not specify it.Something that is confusing is that replace works, as in:Code:var WshShell = WScript.CreateObject("WScript.Shell"); var sValue = "one+two+three"; WshShell.Popup(sValue.search("o")); WshShell.Popup(sValue.search("\x2B"));except replace only replaces the first occcurence; search is useful for determining if there are more.Code:sValue = sValue.replace("\x2B", " ");




Reply With Quote