g3mini   -  Oct 22, 2013

Hello,
i have made a script which triggers as soon as someone says O M G
(my nick = OMG)
it replies with their nick also in spaces example:
Shark says O M G
it replies with S h a r k
but now i have to add each nick seperately
is there a command which sends back $nick but wich spaces between each letter?

Meta  -  Oct 22, 2013

$regsubex($nick,/(?<!^)()(?!$)/g,$chr(32))

Just use where you would want to return $nick with spaces between each letter... eg.. "msg # $nick" would become "msg # $regsubex($nick,/(?<!^)()(?!$)/g,$chr(32))"

g3mini  -  Oct 23, 2013

thanks a lot :)
although could you please explain how regsub/regsubex works cause i'm quite the noob
or a spot where i can learn it

Sorasyn  -  Oct 24, 2013

www.regex101.com Is a nice place to test regular expressions. It makes for a nice guide / playground for learning them.

g3mini  -  Oct 24, 2013

thanks a lot =D
i'll try that

g3mini  -  Oct 24, 2013

what what language is closest to that of mIRC's?

Sorasyn  -  Oct 24, 2013

PHP is pretty similar although it takes some setting up. Python is another good "interpreter" type language. Both very good starting points though. With PHP you'll get a taste of HTML, and possibly some JS which are nice as well.

g3mini  -  Nov 16, 2013

thanks ^^ & i had to learn PHP for school anyways but i can't seem to get regex to work =/
i mean it does work but it sends my stuff twice
original & regex'd

g3mini  -  Jun 10, 2014

fixed this a while ago thought i'd share,
" haltdef" fixed it

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.