would anyone know how to make a regex, that catches things like:
Code:
somthing[!somechars]
abc[!xx]
ect[!gd]

my bot outputs it as nick[!stuff] even if stuff is null,
i tried making a regex, but it keeps screwing up on the [!stuff]
also, i would like it to allow [!stuff] to be there or not.
heres the regex i tried if it would help:
Code:
$regex(cmd2,%r,/\b((\w+)(?:\[([^\s]*)\])?)\b/m)

btw, the %r is in format: a[!b] c[!d] ect