[#1] I have a channel where I want to match bans containing totally ?????? with the !, @ and wildcards (*).
Bans for example like:
*!*????????*@*
???????*!*@*
*!*@*???????*
If I put ?????? into string match it would match against any single characters. How can I make it match the question mark sign?
Would it be: *!*\?\?\?\?\?\?\?\?*@*
By adding an extra slash infront of each question mark?
[#2] Also I want to know the best way to match numerical format ips and their reverses.
##EXAMPLE##
IP: 202.125.84.12
Resolved: host-123-745.cable.interpacket.net
How can I check to see if a ban is made only in the D, B and C (D.B.C.*) range format of the numerical ip and not resolved ip.
Like the ranges are in:
202.125.84.12
D.C.B.A
{([string match -nocase "*\[0-9\].*\[0-9\].*\[0-9\].*" [lindex [split $uhost "@"] 1]])}
And how can I differentiate between a numerical and a resolved one? Matching alphabets in the resolved in? And only numbers in the numerical one?
The thing is the numerical A, B, C, D ranges can contain sometimes 1, 2 or 3 numericals. So how to match all those combinations:
\[0-9\] or \[0-9\]\[0-9\] or \[0-9\]\[0-9\]\[0-9\]
The same goes for resolved IP's. When and where to match alphabets? Maybe split and match the last one (The domain .com, .net, .org, .ca, .us etc). But then again we wouldn't be able to differentiate from vhosts. We would need to match numbers and characters both in resolved addresses.
If anyone can guide me to implement this simple logic would be a thumbs up for them!

(P.S: I am terrible with REGEXP, so don't say implement it with that!)