Thread View: news.software.readers
2 messages
2 total messages
Started by Tom Grydeland
Wed, 17 Sep 1997 00:00
bug in slang regex code (used in slrn)
Author: Tom Grydeland
Date: Wed, 17 Sep 1997 00:00
Date: Wed, 17 Sep 1997 00:00
22 lines
1107 bytes
1107 bytes
The regex library of slang (used in e.g. slrn) applies quantifiers incorrectly to parenthesised expressions. The regex ab\(cc\)* should match ab, abcc, abcccc, etc. Instead, it is interpreted as abc(c*), i.e. it matches abc, abcc, abccc, etc. The same applies to ?. As for +, it's difficult to tell, since (ab)+ and a(b+) matches the same strings (albeit not the same *portions* of these strings) Is there any hope of this being fixed? Is there any hope of getting alternation in the same library? -- //Tom Grydeland <Tom.Grydeland@phys.uit.no>
Re: bug in slang regex code (used in slrn)
Author: John E. Davis
Date: Thu, 18 Sep 1997 00:00
Date: Thu, 18 Sep 1997 00:00
27 lines
1538 bytes
1538 bytes
On 17 Sep 1997 13:59:02 GMT, Tom Grydeland <tom@mitra.phys.uit.no> wrote: >The regex library of slang (used in e.g. slrn) applies quantifiers >incorrectly to parenthesised expressions. > >The regex ab\(cc\)* >should match ab, abcc, abcccc, etc. slrn does not support these expressions. Here is my response from the last time a similar question cam up: On 11 Feb 1997 21:47:41 GMT, Ian T Zimmerman <itz@kronstadt.rahul.net> wrote: >JED: WHY not use a native regexp library if one is available? Such a library is not available on all systems. There also seems to be no uniformity among the various regular expression packages that are available. The slrn/jed/slang regular expressions must be uniform across Unix, MSDOS, OS/2, and VMS. For that reason, as well as licensing issues, I wrote my own set of routines. Someday I will add support for egrep style expressions but I have better things to do at the moment. --John
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads