how to?? reg-ex)

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

Moderator: General Moderators

Post Reply
vin_akleh
Forum Commoner
Posts: 53
Joined: Sat Feb 14, 2009 10:26 am

how to?? reg-ex)

Post by vin_akleh »

can any one tell me what is the correct reg-ex and how to do it to remove both
<!--[if !supportLineBreakNewLine]-->
and
<!--[endif]-->
using something like preg_replace

thanks
User avatar
ridgerunner
Forum Contributor
Posts: 214
Joined: Sun Jul 05, 2009 10:39 pm
Location: SLC, UT

Re: how to?? reg-ex)

Post by ridgerunner »

Try this:

Code: Select all

$str = preg_replace('/<!--.*?-->/s', '', $str);
vin_akleh
Forum Commoner
Posts: 53
Joined: Sat Feb 14, 2009 10:26 am

Re: how to?? reg-ex)

Post by vin_akleh »

that did work but the problem is that is removed every thing with it
i have some images and colors that got removed and the hall text too
and way i am only facing this problem on IE not on other browsers if you would like to see what i mean hear is it
saadizeidan . com
anyway try it on IE and on any other browser and you'll see what i mean.
thanks in advanced
Post Reply