Thread View: news.software.readers
3 messages
3 total messages
Started by Chris Green
Tue, 29 Feb 2000 00:00
[slrn] Full RE for article search
Author: Chris Green
Date: Tue, 29 Feb 2000 00:00
Date: Tue, 29 Feb 2000 00:00
9 lines
991 bytes
991 bytes
Is there any way to get full Regular Expression matching in the slrn 's' article search? I quite often want to search for two or three different things and being able to search for them all in one sweep would be much more convenient. -- Chris Green (chris@x-1.net)
Re: [slrn] Full RE for article search
Author: Heikki Kantola
Date: Tue, 29 Feb 2000 00:00
Date: Tue, 29 Feb 2000 00:00
18 lines
1680 bytes
1680 bytes
Chris Green <cgreen@shell.x-1.net> informed news.software.readers with the following: >Is there any way to get full Regular Expression matching in the slrn >'s' article search? I quite often want to search for two or three >different things and being able to search for them all in one sweep >would be much more convenient. Of course such thing isn't impossible, but at least vanilla S-Lang RE matching can't be used to implement such behaviour as unfortunately it doesn't include grouping operations. :( -- Heikki "Hezu" Kantola, <Heikki.Kantola@IKI.FI> L�hett�m�ll� mainoksia tai muuta asiatonta s�hk�postia yll� olevaan osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta tunnilta.
Re: [slrn] Full RE for article search
Author: J.B. Nicholson-Owens
Date: Wed, 01 Mar 2000 00:00
Date: Wed, 01 Mar 2000 00:00
28 lines
1670 bytes
1670 bytes
Heikki Kantola wrote:
> Of course such thing isn't impossible, but at least vanilla S-Lang RE
> matching can't be used to implement such behaviour as unfortunately it
> doesn't include grouping operations. :(
The closest thing I could think of (short of implementing another regex
engine or linking in a more functional one) is using an orelse/andelse
clause(s). Instead of matching against "a (long|short|windy) day", you
could use something like:
#v+
if (orelse
{ string_match (my_string, "a long day", 1) }
{ string_match (my_string, "a short day", 1) }
{ string_match (my_string, "a windy day", 1) })
{
.
.
.
}
#v-
But that's pretty verbose and doesn't scale well (not to mention it's
inappropriate for user-supplied regexes). Maybe linking in pcre would
be worthwhile?
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