¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Best options for extracting text of unknown length from serial string?


 

Your search string doesn't have to a single byte. But, it might be easier to use reversefind() if 's are included in the titles, I agree, but you don't HAVE to.

--- In Crestron@..., "p00pb0t" <kdp@...> wrote:

He does need to use REVERSEFIND to make sure he parses the whole title. Example


'Hells Kitchen'
'Gordon Ramsey's Kitchen Nightmares'


Finding the first instance of ' after the first instance would give an undesired result on example 2




--- In Crestron@..., "matt_rasmussen_2000" <mjrtoo@> wrote:

You'll have to do some math with the FIND values to snatch the correct chunk of the string you're looking for, usually using MID. You don't HAVE to use reversefind(), you can start the next FIND from the FIND integer position the first instance you searched to using the start position parameter.

--- In Crestron@..., Jonathan Larson <jtlarson@> wrote:

I've never written a stitch in Simpl+, so I'm just learning; but I think you are presuming I would use find() to locate the first apostrophe/paren and then use reversefind() to locate the last, then somehow capture everything that falls between?

Jon

From: Crestron@... [mailto:Crestron@...] On Behalf Of erikm_101
Sent: Wednesday, June 13, 2012 9:04 AM
To: Crestron@...
Subject: [Crestron] Re: Best options for extracting text of unknown length from serial string?



Depending upon how your final string from the server is formatted, you may be able to search against the quote from the right hand side of the string.

Simpl+ reversefind()

There may be a SimplWindows equivalent via a combination of symbols, but I am not sure on that.

hth, erik

--- In Crestron@...<mailto:Crestron%40yahoogroups.com>, Jonathan Larson <jtlarson@> wrote:

Hi folks,

I'm working on adding some logic to check a HTML page on a recording server (MythTV) and return recording status and title. The logic I have so far can parse the HTML and confirm that a recording is taking place, but I'd like to go one step further and extract the title of the recording for display on the TP. The problem is that even though the title is always encased in single quotes, 'Example Title' I can't guarantee that the title will not contain a single quote within itself-e.g. 'Ferris Bueller''s Day Off' -nor can I depend on a certain length to match against.

Any suggestions? Can this be done in Simpl+?

Thanks.

Jon





[Non-text portions of this message have been removed]

Join [email protected] to automatically receive all group messages.