KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following code, which works, but I need to inject some different stuff into the regular expression object ( regex2 ) at runtime. However, text.replace does not seem to like a string object for the regular expression, so how can I make this work? var regex2 = /\|\d+:\d+/; document.write("result = " + text.replace(regex2, '') + "<br>");
Tags (comma-separated)
Save Edits
Cancel