Thread View: news.software.readers
3 messages
3 total messages
Started by lottifran
Sat, 04 Apr 1998 00:00
newsgroup matching
Author: lottifran
Date: Sat, 04 Apr 1998 00:00
Date: Sat, 04 Apr 1998 00:00
22 lines
1474 bytes
1474 bytes
I'd like to match it.* newsgroups into my article_mode_hook function..
Actually I use:
is_substr (current_newsgroup (), "it.")
Using the previous method I run into problems because I don't only match
it.* ng but also every group like *it.*
I don't know how to use regular expressions with slang.. maybe a simple
^it.* regex should be enough but I don't know how to make it suitable for
slang..
How can I get rid of this?
ciao,
--
**** To reply remove +!XXX! from the address ****
[ Francesco L. <goo@ouverture.it> ][ Powered by Linux 2.0.33 ]
[ Alternate address: didefault@usa.net ][ http://goo.home.ml.org ]
[ Dynamic hostname: artemide.dyn.ml.org ][ ICQ UIN: 5529483 ]
[ To get my PGP PUBLIC KEY send a message to goo+PGP@ouverture.it ]
Re: newsgroup matching
Author: Jan Hlavacek
Date: Sat, 04 Apr 1998 00:00
Date: Sat, 04 Apr 1998 00:00
31 lines
1682 bytes
1682 bytes
On 4 Apr 1998 14:47:34 GMT, lottifran <goo+!XXX!@ouverture.it> wrote:
> I'd like to match it.* newsgroups into my article_mode_hook function..
> Actually I use:
>
> is_substr (current_newsgroup (), "it.")
>
> Using the previous method I run into problems because I don't only match
> it.* ng but also every group like *it.*
One possible solution is use strncmp, which compares first n characters
of two strings.
!if (strncmp (current_newsgroup (), "it.", 3)) do_something ();
> I don't know how to use regular expressions with slang.. maybe a simple
> ^it.* regex should be enough but I don't know how to make it suitable for
> slang..
if (string_match (current_newsgroup (), "^it\.", 1)) do_something ();
For more information on slang functions and regular expressions,
visit http://www.math.ohio-state.edu/%7Elahvak/slang/ .
lahvak
--
Jan Hlav\'{a}\v{c}ek
lahvak@math.mps.ohio-state.edu (Blind Carbon Copies will bounce)
www: http://www.math.ohio-state.edu/~lahvak/
Re: newsgroup matching
Author: John E. Davis
Date: Sun, 12 Apr 1998 00:00
Date: Sun, 12 Apr 1998 00:00
12 lines
888 bytes
888 bytes
On 4 Apr 1998 20:16:01 GMT, Jan Hlavacek <lahvak@math.mps.ohio-state.edu>
wrote:
> if (string_match (current_newsgroup (), "^it\.", 1)) do_something ();
This should be:
if (string_match (current_newsgroup (), "^it\\.", 1)) do_something ();
--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