hisoka Posted June 14, 2018 Share Posted June 14, 2018 (edited) var x = " hello w3schools how are you this is the site url http://w3schools.invisionzone.com" var y = x.replace (<\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b>/g , '<$1$2>$3</$1>') could you please tell what do these symbols mean <$1$2>$3</$1> ? Edited June 14, 2018 by hisoka Link to comment Share on other sites More sharing options...
justsomeguy Posted June 14, 2018 Share Posted June 14, 2018 The numbers after a dollar sign are different matches in the pattern. The rest are part of the replacement text. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now