mIRC Home    About    Download    Register    News    Help

Print Thread
#99375 01/10/04 05:18 AM
Joined: Apr 2004
Posts: 48
L
Leoric Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2004
Posts: 48
the var set by $regsub ( $regsub(text, regex, subtext, %var) ) should be temp var, as setted by /var, not permanent as setted by /set

and, maybe a option for do not use vars, like $regsub(text, regex, subtext) for the number of substitutions made, and $regsub(text, regex, subtext).result for the result


__________
dark_light @ irc.brasnet.org
#99376 01/10/04 08:07 AM
Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
If you want it to be a local variable, just create the variable first:
Code:
 
var %temp
.echo -q $regsub(text,re,subtext,%temp)
 

simple.

You may argue that that adds an extra step, but if $regsub were to be changed to automatically do a local variable, then you would need an extra step if you want to store it in a global var; it probably averages out.


If I knew now what I will know then... maybe things will have been different...

Link Copied to Clipboard