LOCAL oRegEx AS VBScript.RegExp LOCAL lcExp ** Sample text TEXT TO lcExp NOSHOW TEXTMERGE <html> <body> Hello this is a <img src="sdsdsd"> test <img src="wewewe" class="all" border="0"> of the image <IMG SRC="apple"> tag parser </body> </html> ENDTEXT CLEAR oRegEx=CREATEOBJECT("VBScript.RegExp") oRegEx.Multiline= .F. oRegEx.IgnoreCase = .T. oRegEx.Global= .T. ** Pattern to match oRegEx.Pattern = "<img\s+.*?>" ** How many matches ?"Matches: ", oRegEx.Execute(lcexp).Count ** Replaces matches with blank ?"Replace: " ?oRegEx.Replace(lcExp,"")