Re: [PHP] stripping comments

2003-10-05 Thread David Otton
On Sun, 5 Oct 2003 04:46:16 -0400, you wrote: >I'm trying to strip comments out of my code. I can get it to strip one >section of comments but the problem comes in when I have more then one >comment section to strip. > >I am using this: $code = preg_replace('/\/*(.*?)*\//is', '$1', $code) and >ne

RE: [PHP] stripping comments

2003-10-05 Thread zzz
Hey perfect Eugene, thanks -Original Message- From: Eugene Lee [mailto:[EMAIL PROTECTED] Sent: October 5, 2003 5:14 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] stripping comments On Sun, Oct 05, 2003 at 04:46:16AM -0400, zzz wrote: : : I'm trying to strip comments out of my cod

Re: [PHP] stripping comments

2003-10-05 Thread Marek Kilimajer
You will run into more problems and there are many things you need to consider, for example "/*" in a string. But token_get_all() will parse php code for you and will make things much simpler. zzz wrote: I'm trying to strip comments out of my code. I can get it to strip one section of comments

Re: [PHP] stripping comments

2003-10-05 Thread Eugene Lee
On Sun, Oct 05, 2003 at 04:46:16AM -0400, zzz wrote: : : I'm trying to strip comments out of my code. I can get it to strip one : section of comments but the problem comes in when I have more then one : comment section to strip. : : I am using this: $code = preg_replace('/\/*(.*?)*\//is', '$1',

[PHP] stripping comments

2003-10-05 Thread zzz
I'm trying to strip comments out of my code. I can get it to strip one section of comments but the problem comes in when I have more then one comment section to strip. I am using this: $code = preg_replace('/\/*(.*?)*\//is', '$1', $code) and need help fixing my regex. example: code 1