How to replace all the character after certain word using javascript replace method.
For example: "This is sample text."
When ever line contain "sample" then from word "sample" to end of line should replace with "*". The line should be
"The is *"
I know that i have to use regular expression but what should be it i dont know?