freelancersblog.net

 

PHP preg_replace regex

February 10th, 2011

I need the regex(s) that goes with php’s preg_replace to substitute each occurrence of the phrase “replace me” with the phrase “replaced” in the non-html tagged content (this is the important part!) shown below. Consider content within the square brackets ([ …replace me … ]) and content between opening and closing tags ([…] … replace me … [/…]) as html tagged content. Examples 1) $content = [img src=”IMAGE.jpg” title=”replace me” alt=”replace me with something”]can this replac…

Original post by Freelancer.com - New Projects

Comments