Re: [newbie] How can I catch a C comment with a regex?

From: Paul Lalli (mritty_at_gmail.com)
Date: 10/08/04


Date: Fri, 08 Oct 2004 16:37:45 GMT


"Belbo" <ba11ard66@hotmail.com> wrote in message
news:295a92eb.0410080830.517d16cd@posting.google.com...
> Hi,
> I've tried to catch C comments (/* ... */) with a cycle like this:
>
> while(($comm =~ /\/\*/) and
> ($comm !~ /\*\//) and
> (defined($next_line=<IN_FICH>)))
> {$comm=$comm.$next_line;}
> print $comm
>
> I'm sure there's an another way less stupid. But what?

I have no idea by what criteria you're defining stupidity in this case.
Regardless:

Please check the Perl FAQ *before* posting to this group:
perldoc -q comment

Paul Lalli



Relevant Pages

  • Re: A China-Sumer connection
    ... Comm wrote: ... > godDAMN you are STUPID! ... Stupid - really really STUPID. ... > You go suck on something, Frenchy. ...
    (sci.archaeology)
  • Re: A China-Sumer connection
    ... Comm wrote: ... > godDAMN you are STUPID! ... Stupid - really really STUPID. ... > You go suck on something, Frenchy. ...
    (sci.anthropology)
  • Re: A China-Sumer connection
    ... Comm wrote: ... > godDAMN you are STUPID! ... Stupid - really really STUPID. ... > You go suck on something, Frenchy. ...
    (sci.lang)
  • Re: Related languages (Re: A China-Sumer connection)
    ... > freaking troll, embarrassing yourself with a New Obessession, proving ... > world that you are too stupid to use a kill file. ... Comm, I've told you before: ...
    (sci.anthropology)