|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
String manipulation in Studio
Hi,
I'm new to studio and don't really know if this is outside of its remit or not. I want to remove all instances of a pariticular character in a string. Specifically I want the imdb lookup in SageMC to remove all stars from the Airing title. At the moment it does this: AddStaticContext("SearchString", GetAiringTitle(Airing)) whereas I'd want it to do something like: AddStaticContext("SearchString", str_replace("*", "", GetAiringTitle(Airing))) Is this possible? Last edited by Alfiegerner; 05-16-2006 at 05:30 PM. |
#2
|
|||
|
|||
Quote:
Not sure if the escape character for the "*" is correct (the second parameter in 'replaceAll' is a regular expression so the "*" has a special meaning), but you could try AddStaticContext("SearchString", java_lang_String_replaceAll(GetAiringTitle(Airing), "\*", "")) Dirk |
#3
|
||||
|
||||
And, I think you're going to have to use "\\*".
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#4
|
|||
|
|||
Thanks guys, much appreciated - the second slash was needed btw.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|