DEV Community

Discussion on: Can I Use replace() method to autoreplace all the chosen strings within a user input box of text type in js?

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

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.

Collapse
 
pavelloz profile image
Paweł Kowalski • Edited

Yep, replace with regexp is the way to go.

duck.com is your friend.

Collapse
 
s3rg1096 profile image
S3RG1096

thx!