Ask Ben: Javascript String Replace Method

alert(
	strText.replace( new RegExp( "s\\b[^ ]+", "gi" ), "[X]" )
	);

For Cut-and-Paste