Thanks for the update, and suggestion on using $cr, i never seen a eof in a line so have been using that, i ran the script through a bunch of test strings and it came out flying, then i put it in the actual code, and wouldnt you know it...
* String too long: $replace
It couldnt reliably deal with substrings over 26 characters, with each one getting a possable 2 charcter replacement and a 34 character regex the line just over shot the max length real quick.
I solved it pretty well, i just chopped the substring up. and replaced it in parts.

heres the code, I didnt do a few of the qother tweaks as i might have to come back one day to this, and if its tweaked up to the max, ill be going, What?!?!?! whats this doing that for etc etc.

%TIM.RawLine is original colorized text
%TIM.Trigger is the complete substring text

Code:
 
    if ($pos(%TIM.RawLine,%TIM.Trigger) == $null) {
      ;  *** BURK codes in the trigger, So isolate trigger and replace with non BURK coded trigger *
      var %TIM.Counter = 1
      while ($mid(%TIM.Trigger,%TIM.Counter,20)) {
        var %TIM.SubString = $ifmatch
        if (%TIM.Counter != 1) var %TIM.SubString = $lf $+ %TIM.SubString
        !.echo -q $regsub(%TIM.SubString,/(?<=.)(?=.)/g,$cr,%TIM.SubString)
        var %TIM.SubString = $replace(%TIM.SubString,\,\\,^,\^,$,\$,.,\.,[,\[,$chr(40),\ $+ $chr(40),$chr(41),\ $+ $chr(41),?,\?,*,\*,+,\+,$chr(123),\{,$chr(125),\},|,\|)
        var %TIM.BurkCodes = (?:[]|(?:\d\d?(?:,\d\d?)?)?)*
        var %TIM.SubString = $replace(%TIM.SubString,$cr,%TIM.BurkCodes)
        !.echo -q $regsub(%TIM.RawLine,$+(/,%TIM.SubString,/gi),$lf,%TIM.RawLine)
        inc %TIM.Counter 20
      }
      var %TIM.RawLine = $replace(%TIM.RawLine,$lf,%TIM.Trigger)
    }

    var %TIM.Hotlink.Trigger =  $+ $replace(%TIM.Trigger ,$chr(160),$chr(26) ,$chr(32),$chr(160) ,$chr(26),$str($chr(160),2)) $+ 
    echo -itlbfmr $1 < $+ $1 $+ > $replace(%TIM.RawLine,%TIM.Trigger,$chr(32) $+ %TIM.Hotlink.Trigger $+ $chr(32))


The last two lines are what i do with the substring/triggering text, I replace the original with one surrounded buy a space & double bold also inside it spaces are replaced with hardspaces, which makes it all one word, I then elsewhere can setup ON HOTLINK events on the text, its being used for fileserver triggers currently, but i also wanted it for some other things i want to implement.