I want to be able to enter a regular expression in a text field and use it as a regex to search the text from a textbox.
This code says reg.compile is not a function, but the same regex entered in code works. I think it is a string conversion problem.
Thanks for your help.
This code says reg.compile is not a function, but the same regex entered in code works. I think it is a string conversion problem.
Thanks for your help.
Code:
var feed=document.forms[0].feedback.value; var reg =document.forms[0].pattern.value + ";"; reg.compile(reg); var aray = reg.exec(feed);
Comment