Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-30 Thread David Harkness
On Wed, May 29, 2013 at 10:20 AM, Matijn Woudt wrote: > It is possible to write a whole parser as a single regex, being it terribly > long and complex. > While regular expressions are often used in the lexer--the part that scans the input stream and breaks it up into meaningful tokens like

Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-30 Thread Sebastian Krebs
2013/5/29 Matijn Woudt > > > On Wed, May 29, 2013 at 10:51 PM, Sebastian Krebs wrote: > >> >> >> >> 2013/5/29 Matijn Woudt >> >>> On Wed, May 29, 2013 at 6:08 PM, Sean Greenslade >> >wrote: >>> >>> > On Wed, May 29, 2013 at 9:57 AM, Jonesy wrote: >>> > > On Tue, 28 May 2013 14:17:06 -0700, Daev

Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-29 Thread Ashley Sheridan
Matijn Woudt wrote: >On Wed, May 29, 2013 at 10:51 PM, Sebastian Krebs >wrote: > >> >> >> >> 2013/5/29 Matijn Woudt >> >>> On Wed, May 29, 2013 at 6:08 PM, Sean Greenslade >>> >wrote: >>> >>> > On Wed, May 29, 2013 at 9:57 AM, Jonesy wrote: >>> > > On Tue, 28 May 2013 14:17:06 -0700, Daevid V

Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-29 Thread Matijn Woudt
On Wed, May 29, 2013 at 10:51 PM, Sebastian Krebs wrote: > > > > 2013/5/29 Matijn Woudt > >> On Wed, May 29, 2013 at 6:08 PM, Sean Greenslade > >wrote: >> >> > On Wed, May 29, 2013 at 9:57 AM, Jonesy wrote: >> > > On Tue, 28 May 2013 14:17:06 -0700, Daevid Vincent wrote: >> > >> I'm adding some

Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-29 Thread Sebastian Krebs
2013/5/29 Matijn Woudt > On Wed, May 29, 2013 at 6:08 PM, Sean Greenslade >wrote: > > > On Wed, May 29, 2013 at 9:57 AM, Jonesy wrote: > > > On Tue, 28 May 2013 14:17:06 -0700, Daevid Vincent wrote: > > >> I'm adding some minification to our cache.class.php and am running > into > > an > > >> e

Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-29 Thread Sean Greenslade
On Wed, May 29, 2013 at 1:33 PM, Matijn Woudt wrote: > > > > On Wed, May 29, 2013 at 7:27 PM, Sean Greenslade > wrote: >> >> > It is possible to write a whole parser as a single regex, being it >> > terribly >> > long and complex. >> > That said, there's no other simple syntax that would work, fo

Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-29 Thread Matijn Woudt
On Wed, May 29, 2013 at 7:27 PM, Sean Greenslade wrote: > > It is possible to write a whole parser as a single regex, being it > terribly > > long and complex. > > That said, there's no other simple syntax that would work, for example in > > javascript you could to the following: > > var http = 5;

Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-29 Thread Sean Greenslade
> It is possible to write a whole parser as a single regex, being it terribly > long and complex. > That said, there's no other simple syntax that would work, for example in > javascript you could to the following: > var http = 5; > switch(value) { > case http:// Http case here! (this whould no

Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-29 Thread Matijn Woudt
On Wed, May 29, 2013 at 6:08 PM, Sean Greenslade wrote: > On Wed, May 29, 2013 at 9:57 AM, Jonesy wrote: > > On Tue, 28 May 2013 14:17:06 -0700, Daevid Vincent wrote: > >> I'm adding some minification to our cache.class.php and am running into > an > >> edge case that is causing me grief. > >> >

Re: [PHP] Re: need some regex help to strip out // comments but not http:// urls

2013-05-29 Thread Sean Greenslade
On Wed, May 29, 2013 at 9:57 AM, Jonesy wrote: > On Tue, 28 May 2013 14:17:06 -0700, Daevid Vincent wrote: >> I'm adding some minification to our cache.class.php and am running into an >> edge case that is causing me grief. >> >> I want to remove all comments of the // variety, HOWEVER I don't wan