I have a paragraph that currently has C:\
How can I use jQuery to change it to be C:*
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Careful! JavaScript’s
string.replacedoesn’t behave the same as other languages. It will only replace one occurrence of the matched string. If you want to do a global search-and-replace you have to use a RegExp object so you can set thegflag:An alternative to regexcersizing the replace operation (especially useful when you have an arbitrary string to replace that might contain regex-special characters), is the JS split-and-join replacement idiom: