Replace only whole word in javascript -



Replace only whole word in javascript -

possible duplicate: match , replace whole words in javascript

i want replace in javascript word "microsoft" "stackoverflow".

but want replace whole word - don't want "microsoft microsftttt" turned "stackoverflow stackoverflowttt".

you can add together ' ' begin of string & end of string, replace ' microsoft ' ' stackoverflow ' , cutting ' ' , added before it

javascript

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -