Re: [newbie] How can I catch a C comment with a regex?
From: Paul Lalli (mritty_at_gmail.com)
Date: 10/08/04
- Next message: Jeff 'japhy' Pinyan: "Re: Using a variable size with the repetition quantifier"
- Previous message: Belbo: "[newbie] How can I catch a C comment with a regex?"
- In reply to: Belbo: "[newbie] How can I catch a C comment with a regex?"
- Next in thread: Jürgen Exner: "Re: [newbie] How can I catch a C comment with a regex?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Jeff 'japhy' Pinyan: "Re: Using a variable size with the repetition quantifier"
- Previous message: Belbo: "[newbie] How can I catch a C comment with a regex?"
- In reply to: Belbo: "[newbie] How can I catch a C comment with a regex?"
- Next in thread: Jürgen Exner: "Re: [newbie] How can I catch a C comment with a regex?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|