This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

regexp can't output all submatchvar's

Old posts that have not been replied to for several years.
Locked
T
Tore
Voice
Posts: 1
Joined: Wed Aug 31, 2005 10:44 am
Location: Rogaland, Norway

regexp can't output all submatchvar's

Post by Tore »

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

I use the following code:

Code: Select all

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: Select all

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

PRIVMSG target :one two three
actually, all IRC command that accept multiword string as their last parameter require that
Locked