Re: [PHP] need some regex help to strip out // comments but not http:// urls
[email protected] (David Harkness)
| Newsgroups | php.general |
|---|---|
| Message-ID | <CAO8qQLnoDBeDuGJqd1cDJGfcyJzLBdUEjk+LnKJQVQS8=CRc6w@mail.gmail.com> |
Hi Daevid, On Tue, May 28, 2013 at 2:40 PM, Daevid Vincent <[email protected]> wrote: > I appreciate the pointer, but our files, like many people, is a mixture of > HTML, PHP and JS in one file. This jsmin appears to only work on .js files > right? Also, everything else works great in our minifing method, just this > edge case. My bad. We moved all our JS and CSS to external files for this very reason and created a plugin to combine and minify everything needed by each page into a unique file. While it does cause some duplication across pages, it means that every page loads exactly one JS and CSS file each. For your situation, I don't know a regular expression that will work in all cases. David