string match matches interprets a pattern expression and matches a string against that.
For the two strings to match, their contents must be identical except that the following special sequences may appear in pattern:
* Matches any sequence of characters in string, including a null string.
? Matches any single character in string.
[chars] Matches any character in the set given by chars. If a sequence of the form x-y appears in chars, then any character between x and y, inclusive, will match. When used with -nocase, the end points of the range are converted to lower case first. Whereas {[A-z]} matches '_' when matching case-sensitively ('_' falls between the 'Z' and 'a'), with -nocase this is considered like {[A-Za-z]} (and probably what was meant in the first place).
\x Matches the single character x. This provides a way of avoiding the special interpretation of the characters *?[]\ in pattern.
tnx caesar i saw an msl code (mirc) using regex and it sets ban on the actual bad part it matches against i was hoping this could be done with tcl as well
I looked at your example and I don't understand how your match is working. From my limited understanding of regexp it should match se with something in the () but there's no se in the nick to begin with. I opened up a mIRC client and tested:
//echo match for ds3kss: $regex("ds3kss",/(se(x|ks)|(s|f)uck|p(orn|enis)|h[0o]rny)/i)
match for ds3kss: 0
simo wrote:how would it look like in the code caesar?
Did you try to implement the part of code ?
I won't speak for caesar or others, but when I help, my intention is to teach something to the asker, not to just do it for him.
You ask a lot of things but seem to not try to understand what is done or how it works.
its not about not trying since i always try but when u have no clue where to add things or how to integrate something rather than to have random guess and try things that arent proper i asked for how it would look like so i can use as an example for other codes to give me an idea how it would look like in code
thanks caesar could a combination of the two be used ? like to have the words in a variable to go throu the regexp to have freedom to add words in a more managable way