You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: Add a string to the expression that might appear once (or not).
Parameter
Description
Stringvalue
The string to be looked for
Example: The following matches all strings that begin with http:// or https:// and converts them to HTML links.
varmy_paragraph="Take a look at the link http://google.com and the secured version https://www.google.com";varexpression=VerEx().find("http").maybe("s").then("://").anythingBut(" ");my_paragraph=expression.replace(my_paragraph,function(link){return"<a href='"+link+"'>"+link+"</a>";});/* Outputs:Take a look at the link <a href='http://google.com'>http://google.com</a> and the secured version <a href='https://www.google.com'>https://www.google.com</a>*/