mIRC Home    About    Download    Register    News    Help

Print Thread
#197773 13/04/08 08:14 PM
Joined: Jan 2008
Posts: 8
K
Kerst Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Jan 2008
Posts: 8
my error is basicly using $N tokens in regsubex replacements isnt working.

for example;

Code:
//tokenize 32 hello there | echo -ta $regsubex(abc,/b/,$1)


would return 'ac'

could this be fixed?

i know you can yourself with $regsubex(abc,/b/, [ $1 ] )
but if it would work normally would be way better smile

and for my own interest, is it because mIRC uses a regex engine, and in other languages backreferences are called via $N ?

Last edited by Kerst; 13/04/08 08:22 PM.
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Originally Posted By: Kerst
i know you can yourself with $regsubex(abc,/b/, [ $1 ] )
but if it would work normally would be way better smile
Especially since using [ $1 ] inside an identifier is not 'safe' (eg if $1 contains a comma).

Originally Posted By: Kerst
and for my own interest, is it because mIRC uses a regex engine, and in other languages backreferences are called via $N ?
No, mirc uses $N internally in the same way they're used in scripts, merely for convenience. See this for a bit more.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Jan 2008
Posts: 8
K
Kerst Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: Jan 2008
Posts: 8
thanks, and i didnt see that topic frown


Link Copied to Clipboard