home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!bcstec!galileo!meb4593
- From: meb4593@galileo.rtn.ca.boeing.com (Michael Bain)
- Newsgroups: comp.lang.perl
- Subject: Re: C comment parser?
- Message-ID: <1271@galileo.rtn.ca.boeing.com>
- Date: 16 Dec 92 22:50:10 GMT
- References: <1268@galileo.rtn.ca.boeing.com> <mcook.724208094@fendahl.dev.cdx.mot.com>
- Organization: Boeing Commercial Airplane Group, Seattle
- Lines: 25
-
- mcook@fendahl.dev.cdx.mot.com (Michael Cook) writes:
- >
- >Remember that RE's are maximally matched (in Perl, and most Unix tools). If
- >$_ has two or more comments in it, that s/// is going to delete them all in
- >one swoop, and it'll also delete everything between the comments.
-
- Hmm, I didn't know that (says the self-taught UNIX person that only read
- man pages, and the camel book).
-
- >But RE's are really the way to go. The if comment is very big, Perl will dump
- >core. (I tried it.)
-
- Yup, that happened with your RE. Although slow, the function you gave
- me should work. Thanks for your help.
-
-
-
-
-
-
- --
- Michael Bain (206) 234-6942
- Boeing Commercial Airplane Group meb4593@icdfs.ca.boeing.com
- Seattle, WA 98124
-
-