Is there any way I can do this... user presses a button, button finds all urls, example.com
, and replaces it with sub.example.com
?
Find url and replace?
207 Views Asked by Charlie At
2
Is there any way I can do this... user presses a button, button finds all urls, example.com
, and replaces it with sub.example.com
?
Try this:
To clarify, this is using the CSS attribute selector. The example finds
a
tags who have anhref
value of exactly 'example.com' - if your links hadhttp://www.
(or something like that) in front of them, this would not match them. There are more variations of the attribute selector, refer to http://css-tricks.com/attribute-selectors/ for examples.