Let's say there is a long-*ss paragraph, and some words in it are issues to copyright, so custom replacements are needed to all strings in p or span tags. By the way, it can be also a user-inputted text that is to be changed to fit the rules. Now, can i create a function with replace() method, and, is it possible to change the strings automatically by ".onclick"-ing on ? Pls provide a fully functional code of both <!DOCTYPE html> '/html' and 'script' '/script'.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (3)
Replace can take regex patterns.
This can happen on keyup.
I won't be providing any code sorry, but that's how you would solve it.
Yep, replace with regexp is the way to go.
duck.com is your friend.
thx!
Some comments may only be visible to logged-in visitors. Sign in to view all comments.