comtest9.hsp

sample\comobj\comtest9.hsp » Plain Format

	;	正規表現(RegExp)を使った置換
	;
	teststr="This is a pen."
	testptn="This"
	repstr="That"
	mes "対象文字 \""+teststr+"\""
	mes "検索文字 \""+testptn+"\""
	mes "置換文字 \""+repstr+"\""
	newcom oReg,"VBScript.RegExp"
	comres result
	oReg("Pattern")=testptn
	oReg->"Replace" teststr,repstr
	mes "置換結果 \""+result+"\""
	delcom oReg