Article View: news.software.readers
Article #59872Re: [slrn] possible to use 'or' expression in s-lang regular expression?
From: Thomas Schultz
Date: Thu, 30 Mar 2000 00:00
Date: Thu, 30 Mar 2000 00:00
34 lines
2685 bytes
2685 bytes
On 29 March 2000 at 17:41 GMT, John E. Davis <davis@space.mit.edu> wrote: > Assuming that I understand what you are saying, this would not work > for several reasons: > 1. A wrapper would be required that maps either the slang RE > syntax to pcre syntax, or visa versa. [...] I think there is a misunderstanding. My idea is: 1. When compiling slang, the user (or his administrator) can decide what syntax he likes to use when he is asked to enter a regular expression. 2. To evaluate a regular expression the user has entered, we use SLnew_re_interface(). As the user himself chose the syntax, we can assume that the regular expression he provided does what he wants. I do not see why we should map it to slang RE or use any #if..#else..#endif directives in this case. 3. Evaluating such a user-defined RE can be done by simply calling SLnew_re_interface(). Currently (without this function), we need #if..#else..#endif whereever we want to make use of pcre and still be portable. 4. To evaluate hardcoded regular expressions (provided by the developer, e.g. to identify an error message), we go on using SLang_regexp_match() and slang syntax. In this case, we do not have to worry whether or not the user compiled in additional pcre support for himself (so no #if..#else..#endif is needed either). I hope I expressed myself more clearly this time. -- Thomas Schultz <tststs@gmx.de>
Technical Details
Message-ID:
<slrn8e6p2e.136.tststs@starflower.tststs.ddns.org>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:
<slrn8dpjcj.9s1._hate_spam_thunder7@middle.of.nowhere> <slrn8dq0rs.h84.bluemoon@ux6.cso.uiuc.edu> <slrn8dqcuf.i6u.tststs@starflower.tststs.ddns.org> <slrn8dr094.9lh.davis@aluche.mit.edu> <slrn8dr2gg.4fi.thorfinn@netizen.com.au> <slrn8dsavg.l3l.tststs@starflower.tststs.ddns.org> <slrn8dsfk7.aud.davis@aluche.mit.edu> <slrn8e1gfk.9m.tststs@starflower.tststs.ddns.org> <slrn8e1pff.gpt.davis@aluche.mit.edu> <slrn8e41bp.12i.tststs@starflower.tststs.ddns.org> <slrn8e4g2n.ke9.davis@aluche.mit.edu>Show Full Headers
Complete Article Headers
Message-ID: <slrn8e6p2e.136.tststs@starflower.tststs.ddns.org> Subject: Re: [slrn] possible to use 'or' expression in s-lang regular expression? Date: Thu, 30 Mar 2000 00:00:00 +0000 From: tststs@gmx.de (Thomas Schultz) References: <slrn8dpjcj.9s1._hate_spam_thunder7@middle.of.nowhere> <slrn8dq0rs.h84.bluemoon@ux6.cso.uiuc.edu> <slrn8dqcuf.i6u.tststs@starflower.tststs.ddns.org> <slrn8dr094.9lh.davis@aluche.mit.edu> <slrn8dr2gg.4fi.thorfinn@netizen.com.au> <slrn8dsavg.l3l.tststs@starflower.tststs.ddns.org> <slrn8dsfk7.aud.davis@aluche.mit.edu> <slrn8e1gfk.9m.tststs@starflower.tststs.ddns.org> <slrn8e1pff.gpt.davis@aluche.mit.edu> <slrn8e41bp.12i.tststs@starflower.tststs.ddns.org> <slrn8e4g2n.ke9.davis@aluche.mit.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-mail X-Deja-AN: 604351365 X-Server-Date: 30 Mar 2000 14:37:10 GMT X-Complaints-To: abuse@cityweb.de Organization: Pinguin online. User-Agent: slrn/0.9.6.2+ (Linux) NNTP-Posting-Date: 30 Mar 2000 14:40:46 GMT Newsgroups: news.software.readers