Article View: news.software.readers
Article #31489Re: [slrn] Regexp syntax in rc file?
From: Ian T Zimmerman
Date: Wed, 19 Feb 1997 00:00
Date: Wed, 19 Feb 1997 00:00
43 lines
2615 bytes
2615 bytes
In article <slrn5g9e0e.u6m.davis@mygir.davis.net>, John E. Davis <davis@space.mit.edu> writes: > On 14 Feb 1997 10:23:52 GMT, Ian T Zimmerman <itz@nojunk.rahul.net> > wrote: > >In that case, I still don't understand why my setting of > > ignore_quotes "^[ ]*\(>[ ]*\)+" > > > > doesn't work. (Yes, I know it's redundant). It seems to conform > > to > >the syntax you give. In particular, it doesn't use any | > >connectives (the symbol doesn't even occur in it). > This syntax might appear to be conforming but it is not. The \( \) > pair simply serves to define the text matched by the regular > expression it encloses. That text may be referenced by \1, \2, etc. > However, since you do not have reference in your expression, the > resulting regular expression is just "^[ ]*>[ ]*+" which I do not > think was your intent. Aha! So what you're saying is that the \( \) pair doesn't group stuff inside it for the purpose of postfixing with * or +. Sorry, but I don't think anybody would have guessed this without a hint, because no other brand of regexps I know of works that way. Also, the short syntax summary you posted said something like "+ matches one or more occurence of the preceding _regular expression_" (emph mine). So in the absence of warning to the contrary, it's natural to assume this means _any_ kind of regexp, including \( ... \). This really needs to be documented. On a different subject (please redirect followups if this belongs somewhere else), how does one actually use embedded S-Lang from C code? In the Programmer's Guide, there's not a word on the specifics of this. -- Ian T Zimmerman <itz@rahul.net> I fully support the President's proposal to test driver's license applicants for drugs. Any plan to reduce driving is worth a try.
Technical Details
Message-ID:
<slrn5gmig1.g6b.itz@kronstadt.rahul.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn5g1q7t.gc4.itz@kronstadt.rahul.net> <slrn5g41sd.rr4.davis@mygir.davis.net> <slrn5g6geu.23h.itz@kronstadt.rahul.net> <slrn5g81gd.gfg.davis@aluche.mit.edu> <slrn5g8f9n.4nr.itz@kronstadt.rahul.net> <slrn5g9e0e.u6m.davis@mygir.davis.net>Show Full Headers
Complete Article Headers
Message-ID: <slrn5gmig1.g6b.itz@kronstadt.rahul.net> Subject: Re: [slrn] Regexp syntax in rc file? Date: Wed, 19 Feb 1997 00:00:00 +0000 From: itz@nojunk.rahul.net (Ian T Zimmerman) References: <slrn5g1q7t.gc4.itz@kronstadt.rahul.net> <slrn5g41sd.rr4.davis@mygir.davis.net> <slrn5g6geu.23h.itz@kronstadt.rahul.net> <slrn5g81gd.gfg.davis@aluche.mit.edu> <slrn5g8f9n.4nr.itz@kronstadt.rahul.net> <slrn5g9e0e.u6m.davis@mygir.davis.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 219888143 Organization: a2i network Newsgroups: news.software.readers