revSpeak in Mac OS 10.9

Peter M. Brigham pmbrig at gmail.com
Sun Dec 15 15:01:35 EST 2013


I'm not a RegExpert and I love LC's text manipulation power, so I'm biased, but I think this is just as easy to do with LC, and possibly faster for large texts:

function cleanTextForRevspeak tText
   put "abcdefghijklmnopqrstuvwxyz.?" into allowedChars
   repeat for each char c in tText
      if c is not in allowedChars then next repeat
      put c after textOut
   end repeat
   return textOut
end cleanTextForRevspeak

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig


On Dec 15, 2013, at 11:21 AM, Robert Sneidar wrote:

> Is there a way to use RegEX to remove all but upper case, lower case, periods and question marks? I am not good at RegEx so I couldn’t tell you where to begin, but it seems like just the thing RegEx was made for. 
> 
> Bob
> 
> 
> On Dec 14, 2013, at 10:19 AM, Alejandro Tejada <capellan2000 at gmail.com> wrote:
> 
>> Great to know! Many Thanks for
>> posting this update about ascii
>> character incompatible with revSpeak.
>> 
>> Now, we need a volunteer to add this info to
>> the dictionary. :D
>> 
>> http://docs.runrev.com/Command/revSpeak
>> 
>> Al




More information about the use-livecode mailing list