<--- --------------------------------------------------------------------------------------- ---- Blog Entry: Ask Ben: Javascript String Replace Method Author: Ben Nadel / Kinky Solutions Link: http://www.bennadel.com/index.cfm?dax=blog:142.view Date Posted: Jul 17, 2006 at 7:36 AM ---- --------------------------------------------------------------------------------------- ---> alert( "Value Count: " + CountValue( strText, new RegExp( "th", "gi" ) ) );