pattern not finding a match...

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

pattern not finding a match...

Post by Burrito »

Code: Select all

$str = preg_replace('/.*?<img src="images\/spy-head_11.jpg"/ism',$headstring,$str);
basically I need to replace everything before and including the start of this image tag with my $headstring var. For some reason it's not matching.

any ideas?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

ahh! nm, fckeditor decided it was important to change the order of the tag attributes of my image tag...
Post Reply