Thread View: news.software.readers
6 messages
6 total messages
Started by Guido Notari
Tue, 06 May 1997 00:00
slrn : regular expressions
Author: Guido Notari
Date: Tue, 06 May 1997 00:00
Date: Tue, 06 May 1997 00:00
17 lines
920 bytes
920 bytes
This is the regular expression I use in mutt (mail reader), to recognize quoted text: "^[|:}] |^ *>|^[a-zA-Z]*> " It does not work in Slrn, probably due to the "|" characters. "\|" doesn't seem to work, either. Any hints? Guido -- Guido Notari (EC Joint Research Centre, Ispra site) postal: TP 210, JRC, 21020 Ispra (VA), Italia tel: +39 332 785528 fax: +39 332 785813
Re: slrn : regular expressions
Author: Eli the Bearded
Date: Tue, 06 May 1997 00:00
Date: Tue, 06 May 1997 00:00
24 lines
2121 bytes
2121 bytes
Guido Notari <guido.notari@jrc.it> wrote: >This is the regular expression I use in mutt (mail reader), to recognize >quoted text: >"^[|:}] |^ *>|^[a-zA-Z]*> " >It does not work in Slrn, probably due to the "|" characters. "\|" doesn't >seem to work, either. Any hints? I have never used slrn, so I can't state for sure (Sven, where are you?) but some regexp engines only like ^ at the start of an RE, so for those "^([|:}] | *>|[a-zA-Z]*> )" would be better. You may need to use \|, and \( and \) still. Of course that RE will ahve problem with certain nested quotes and odd quote strings still. AI or at least looking at multiple lines for repeated initial strings is best. I could write a perl RE for contigous lines fairly easily, but I doubt most newsreaders can handle perl regexps for multiple line matches. Elijah ------ maybe I should look into what libperl.so offers
Re: slrn : regular expressions
Author: Hrvoje Niksic
Date: Wed, 07 May 1997 00:00
Date: Wed, 07 May 1997 00:00
21 lines
1765 bytes
1765 bytes
lahvak+n@math.ohio-state.edu (Jan Hlavacek) writes: > The problem is that slang regexps cannot fork. There is nothing > like | or \|. And you are right, ^ matches the begining of line > only when it's the first character in the regexp, otherwise it just > matches literal ^. It should be feasable to improve Slang regexps by using the better ones, provided by free RE libraries. GNU regex and rx come to mind, but there are others. Are there any special reasons why Slang couldn't use those? -- Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia --------------------------------+-------------------------------- Unspeakable horrors from outer space paralyze the living and resurrect the dead!
Re: slrn : regular expressions
Author: John E. Davis
Date: Thu, 08 May 1997 00:00
Date: Thu, 08 May 1997 00:00
29 lines
1657 bytes
1657 bytes
On 07 May 1997 06:59:41 +0200, Hrvoje Niksic <hniksic@srce.hr> wrote: >It should be feasable to improve Slang regexps by using the better >ones, provided by free RE libraries. GNU regex and rx come to mind, >but there are others. > >Are there any special reasons why Slang couldn't use those? This topic has been dealt with before: 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
Re: slrn : regular expressions
Author: Hrvoje Niksic
Date: Fri, 09 May 1997 00:00
Date: Fri, 09 May 1997 00:00
31 lines
2218 bytes
2218 bytes
"John E. Davis" <davis@space.mit.edu> writes:
> On 07 May 1997 06:59:41 +0200, Hrvoje Niksic <hniksic@srce.hr> wrote:
> >It should be feasable to improve Slang regexps by using the better
> >ones, provided by free RE libraries. GNU regex and rx come to mind,
> >but there are others.
> >
> >Are there any special reasons why Slang couldn't use those?
>
> This topic has been dealt with before:
[...]
This has nothing to do with what I asked. Ian's question was why
Slang doesn't use /native/ regexps on various Unix systems, wheras I
ask why it doesn't use GNU regexp or GNU rx.
GNU regex and rx are not diverging among systems, and have no
licensing problems (if your code is GPL-ed). They have generally good
performance, and rx is POSIX compliant.
Of course, you could add all those features yourself, but -- as you
say yourself -- there are better things to do.
--
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
4. Thou shalt not warlorde a sig if it bee the sig of Kibo, nor if
it bee the sig of the Inner Circle.
Re: slrn : regular expressions
Author: John E. Davis
Date: Wed, 14 May 1997 00:00
Date: Wed, 14 May 1997 00:00
23 lines
1143 bytes
1143 bytes
On 6 May 1997 16:36:29 GMT, Guido Notari <guido.notari@jrc.it>
wrote:
>This is the regular expression I use in mutt (mail reader), to recognize
>quoted text:
>
>"^[|:}] |^ *>|^[a-zA-Z]*> "
>
>It does not work in Slrn, probably due to the "|" characters. "\|" doesn't
>seem to work, either. Any hints?
In your .slrnrc file, try:
ignore_quotes "^[|:}]" "^ *>" "^[a-zA-Z]*> "
The 'ignore_quotes' line can contain up to 5 regular expressions. I
use:
ignore_quotes "^\t? \\{0,5\\}[]{}><:=|+\xBB!]" "^[\t ]*[A-Za-z]+>"
--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