But with this i got a problem, sometimes color can be "24,23" and it will detect it as "24,2", so i want him to check if there are no numeric character just next
I tried to add something like "[a-zA-Z]" but it wasn't working, im from mirc scripting and sometimes i make few mistake, this is working on mircscripting.
Is there anyway to add just at the end of my actual patern a sequence who mean 'anything else than a number' ?
(0)?8,(0)?2 or \003(0)?8,(0)?2 should match the color scheme you are looking for. note the 0's are optional because they are not required in irc therefor not always used. You shouldn't need the higher number because nobody ever really uses them. but modified version would be something like..
try \D+ instead of [^\d]
\D is essentially the same thing as ^\d... You may also want to look at exactly what is being passed, maybe there is other control codes, or a space or something else between the color codes and the non-digit.
No, im sorry you were right, [^\d] is working correctly, i just add problem cause my bot tried to launch this as a command [], i don't know why but i made this :
Don't know if this makes much difference, but i always put regular expressions inside {} brackets rather than "". As i know {} forces it to ignore any special charactors that tcl would normally parse itself. (such as the []'s)
This should eliminate the need for the extra \ escapes you put into the code.