| View previous topic :: View next topic |
| Author |
Message |
Tore Voice
Joined: 31 Aug 2005 Posts: 1 Location: Rogaland, Norway
|
Posted: Wed Aug 31, 2005 11:06 am Post subject: regexp can't output all submatchvar's |
|
|
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 |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Aug 31, 2005 11:14 am Post subject: |
|
|
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 |
|
 |
|