Pattern match and replace in Javascript
- by T_t
There is something in my mind:
In a web page,there are lots of things we can see from our browser.One of them is text.
Now i have some patterns,"abc","hello",or some other strings.In the text, i want to find all the patterns and change the color or background-color of them.
Like this:
text: what a wonderful day! pattern: "a","day"
resulet: what a wonderful day!
How can solve this whit Javascript?