Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: need regex help to strip things like embedded C comments

by syphilis (Archbishop)
on Jul 22, 2007 at 00:44 UTC ( [id://628054]=note: print w/replies, xml ) Need Help??


in reply to need regex help to strip things like embedded C comments

Hi Eradicatore,

You can't embed comments like that in C:
C:\_32\C>type try.c /* this is a test * c file /* with an embedded comment */ * in the middle * */ int main(void) { int a; int b; return 0; } C:\_32\C>gcc -o try.exe try.c try.c:3: error: syntax error before "the" try.c:11: error: syntax error before "return" C:\_32\C>
The comment is deemed to end at the first occurrence of */.

Cheers,
Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://628054]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found