FordLawnmower commented on a Page, all channels identifier $chans  -  Sep 29, 2009

Nice regsubex sunslayer :)
I call that the WorldDMT trick cause that's where I learned it.
If someone doesn't understand how it works, a string of .(dots) is created based on the number of channels. So if there are 7 channels it's like this -->> .......
You use /./g to make it find all matches of the .(dot)
Each time it finds a .(dot) it will do a substitution, so you can use \n inside of $chan() - ie $chan(\n) to return each channel because \n will return the number of the current match or .(dot)
It's a sweet shortcut that can save lots of time and replace a lot of code.

 Respond  
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.