Ask Ben: Javascript String Replace Method
strReplaceAll = strText.replace( new RegExp(
"(T|t)(H|h)"
,
"g"
),
"[X]"
); alert( strReplaceAll );
For Cut-and-Paste
strReplaceAll = strText.replace( new RegExp( "(T|t)(H|h)", "g" ), "[X]" ); alert( strReplaceAll );