I realize I don't understand very much about $regsubex yet.
Earlier, in this little piece of code, I didn't understand the ":/(.*)/:" part either, other than that it would put the text in $regml(1), and I just worked with that.
on &$^*:text:/(.*)/:#:{
echo -bfi2lmqt $chan $+(<, $left($remove($nick($chan, $nick).pnick, $nick), 1) , $nick, >) $replace($+($chr(32), $regml(1)), $+($chr(32), $chr(32)), $+($chr(32), $chr(160)))
haltdef
}
Then coming to this piece of code. I haven't worked with binvars, but bset seems obvious enough. Can't simply use bset -t, since it would eat the spaces, but then comes the part after.
;/KeepSpaces <window>
;$keepspaces(<window>)
alias KeepSpaces {
;this subs out every character for it's nummeric value, then stores it into a &binvar
bset &tmp $regsubex($editbox($$1-),/(.)/g,$asc(\t) $+ $chr(32))
;dostuff with &tmp. Possibly add it to a hashtable(/hadd -b) to recall later[$hget(table,item,&var)]?
}
$regsubex($editbox($$1-),/(.)/g,$asc(\t) $+ $chr(32))
The first part, $editbox($$1-), is where the text is supposed to go, I can understand that. The second and third parts are quite lost on me. I know $asc of course, but I have no clue why it's doing that on \t.
EDIT:
http://www.regular-expressions.info/ seems to have the information I need. I'm starting to see the light.