Re: use preg_replace to nix and line with "display: none"
| From: | Ben Dunlap | Date: | Sun, 09 Aug 2009 23:39:17 +0000 |
| Subject: | Re: use preg_replace to nix and line with "display: none" | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296530@lists.php.net to get a copy of this message | ||
> > $pattern = '|^.+?display:none.+?$|mi';
[8<]
> I found your use of ? rather... creative... Anyway, just add the
You mean the non-greedy flag? I think that's necessary the way the
regex was originally formulated -- without it, ".+display" would
gobble up all of the list-items until the last one.
Ben