mIRC Homepage
Posted By: gabriel_ script for repeating characters - 04/09/20 02:40 AM
Hi all. smile
I need a code that detects the repeated characters and replace the word with the original without repeating, i.e .:

hooooooowwwwww areeeee yooooou = how are you
hiiiiiiii = hi

I know there would be some problems with some characters like lowercase 'L' and so on but it doesn't matter.

Could someone help me with the code? I can't think of any way to do it.
I'm Sorry for my bad English.
Thank you very much!
Posted By: Thrull Re: script for repeating characters - 05/09/20 08:45 AM
Do you want the script to detect when other use repeating characters or when you do?
Posted By: gabriel_ Re: script for repeating characters - 08/09/20 02:42 PM
Hi!
Yes, when other use repeating characters!
Thank you smile
Posted By: maroon Re: script for repeating characters - 08/09/20 06:05 PM
This matches only when a character if followed by itself at least 2+ extra times, so it does not change the 'll' because there is only 2 of them

//var %pattern /(.)\1{2,}/g | echo -a $regsubex(foo,heeeellooo hooooooowwwwww areeeee yooooou,%pattern,\1)
Posted By: gabriel_ Re: script for repeating characters - 17/09/20 02:23 AM
Thank you very much, it was what I needed! Thank you!! grin grin
© mIRC Discussion Forums