Author Topic: Text Replacing - Limit radiotext character length  (Read 3234 times)

South Coast FM Tech

  • Newbie
  • *
  • Posts: 29
Text Replacing - Limit radiotext character length
« on: December 17, 2021, 05:16:08 am »
Hi Jan,

How would I use Text Replacing to limit the number of characters sent in radiotext.
(ie: Truncate the string at say 30 characters max.)
I've tried various %REGEX%, but not been successful so far.

Something like...
Change: %REGEX%.{0,30}.+
To: (blank)

thanks, Rod

Jan

  • Hero Member
  • *****
  • Posts: 1139
Re: Text Replacing - Limit radiotext character length
« Reply #1 on: December 19, 2021, 06:26:31 pm »
A new command has been added to the Text replace in version 4.0.34:

%MATCHEDSTR%

Example of use (limit the text length to 30 characters):

Change
%REGEXP%^.{0,30}

To
%CLEAR%%MATCHEDSTR%

South Coast FM Tech

  • Newbie
  • *
  • Posts: 29
Re: Text Replacing - Limit radiotext character length
« Reply #2 on: December 19, 2021, 11:47:06 pm »
Thanks Jan,

The Text Replacing '%CLEAR%%MATCHEDSTR%' for text truncation that you've just implemented worked perfectly.

cheers, Rod