egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

regexp can't output all submatchvar's

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Tore
Voice


Joined: 31 Aug 2005
Posts: 1
Location: Rogaland, Norway

PostPosted: Wed Aug 31, 2005 11:06 am    Post subject: regexp can't output all submatchvar's Reply with quote

Hi
This is my first try on a tcl script and i got a little problem..

I use the following code:
Code:
regexp -nocase -line {<b>(.*)</b>((.*))<b>Party</b>(.*)<br><font color="#707070">(.*)</font><br>} $data match 1 2 3 4
putserv "PRIVMSG $chan $1 $2"

but i can't get it to output all variables in the same line it just outputs $1.

If i add a line with:
Code:
putserv "PRIVMSG $chan $2"

it output that variable to, but i cant output both $1 and $2 in the same line.

Therefor i simply ask, what have i missed out on?

thanks in advance,
Tore
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Aug 31, 2005 11:14 am    Post subject: Reply with quote

hmm your code is not Tcl, it's pseudo-code... post your actual code

and note that PRIVMSG will accept multiword strings only after a colon:
Code:

PRIVMSG target :one two three

actually, all IRC command that accept multiword string as their last parameter require that
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber