Article View: news.software.readers
Article #49049slrn scoring regular expression tips
From: Dawn Owens-Nicholson
Date: Thu, 03 Jun 1999 00:00
Date: Thu, 03 Jun 1999 00:00
43 lines
2455 bytes
2455 bytes
Peppe wrote: > I do know what * means. Thanks for pointing it out, so other won't > make the mistake. If you are interested in regular expressions, there's an excellent book published by O'Reilly on the topic--_Mastering Regular Expressions_ (MRE for short) by Jeffrey E.F. Friedl. He also publishes changes from one reprinting to the next on his websites: [from page 309, the first page of Appendix A in the March 1997 reprint of MRE] http://www.wg.omron.co.jp/cgi-bin/j-e/jfriedl.html http://www.itc.omron.com/cgi-bin/j-e/jfriedl.html http://enterprise.ic.gc.ca/cgi-bin/j-e/jfriedl.html http://www.gsquare.or.jp/cgi-bin/jfriedl/j-e/jfriedl.html MRE is largely for Perl, but there is much that applies to all regular expression packages, even if it doesn't apply literally (for example, S-Lang's regular expressions does not (yet?) have grouping parentheses). > Like in "<c928400@urdybet.pbk.bk>"? Seems like the leading, unique > (sp?), part is not addressed. Leads to failure, afaict. Correct, I made a typo, the leading "<" shouldn't have been there: References: c928400@urdybet\.pbk\.bk will find your e-mail address anywhere in the References header. Since it appears at the end of the message-ID, you could also do stuff like this to keep from finding /all/ the followups to your posts: References: c928400@urdybet\.pbk\.bk> <[^>]+> and such. > Ok, it should be "<.[^>]*>" then, I'd say. Actually, the period isn't strictly necessary there, but it doesn't mismatch. If you removed the period, the asterisk (as opposed to plus) would allow "<>" to match, but that's a preference issue. Happy newsreading!
Technical Details
Message-ID:
<slrn7lduj6.mn1.bluemoon@ux6.cso.uiuc.edu>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:
<slrn7l8iro.g1.realcosmo@gelitten.infra.de> <slrn7l8m5q.c0.c928400@urdybet.pbk.dk> <slrn7lb7vm.btv.bluemoon@ux6.cso.uiuc.edu> <slrn7lc3mo.3rk.c928400@urdybet.pbk.dk>Show Full Headers
Complete Article Headers
Message-ID: <slrn7lduj6.mn1.bluemoon@ux6.cso.uiuc.edu> Subject: slrn scoring regular expression tips Date: Thu, 03 Jun 1999 00:00:00 +0000 From: bluemoon@ux6.cso.uiuc.edu (Dawn Owens-Nicholson) References: <slrn7l8iro.g1.realcosmo@gelitten.infra.de> <slrn7l8m5q.c0.c928400@urdybet.pbk.dk> <slrn7lb7vm.btv.bluemoon@ux6.cso.uiuc.edu> <slrn7lc3mo.3rk.c928400@urdybet.pbk.dk> 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: 485429470 Organization: University of Illinois at Urbana-Champaign User-Agent: slrn/0.9.5.6 (UNIX) Newsgroups: news.software.readers