Author Topic: Flexibility of RegEx and replacing text  (Read 1930 times)

0 Members and 1 Guest are viewing this topic.

SexGecko

  • Jr. Member
  • **
  • Posts: 15
  • Karma: 0
    • View Profile
Flexibility of RegEx and replacing text
« on: December 19, 2011, 06:19:51 PM »
I'm finally getting back into toying around with this and I was wondering how easy it would be to replace text in my variables.

I have something like:

Get weather command
Results.storelast into {weather}
???
TTS. Speak {weather}

But in the "???" I'd like to replace some text
(for example instead of saying "ten degrees see(C)" I'd rather it be "centigrade" or something.
And instead of saying "Wine-d ess double-you (Wind SW), maybe something as ambitious as "A south-westernly wind"(Note said "win'd" not "wine-d"))

I can figure out the logic fine I'm sure, I'm just not sure how to replace text within my variables properly, your help would be much appreciated.
« Last Edit: December 19, 2011, 06:25:01 PM by SexGecko »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Flexibility of RegEx and replacing text
« Reply #1 on: January 04, 2012, 08:53:56 AM »
sorry, this one slipped through the cracks.  Do you still need help with this?

Are you using the google weather plugin, or scraping text by yourself?

What version of VC are you using?