home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Electronic Program Guide
WebEPG
Parsing Strings (regexp?)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="arion_p" data-source="post: 529851" data-attributes="member: 45945"><p>This should work, but you don't need to replace "Episode " with an empty string, you can just remove it, as in:</p><p>[code]<Modify channel="*" field="#EPISODE" search="Episode\s" action="Remove"></Modify>[/code]You could easily get the same result using the following:</p><p>[code]<Search match="(?<=Episode\s)[0-9]{1,3}" field="#EPISODE" remove="false" /></p><p><Search match="Episode\s[0-9]{1,3}" remove="true" />[/code]The first search will find the episode number and store only the number in #EPISODE (note the use of the "<em>positive lookbehind grouping construct</em>"). The second search just removes the entire "Episode nnn" string, so it does not appear in other fields. If you use only the search with remove="true", it would only remove the episode number but not the string "Episode ".</p><p></p><p>In general the order of operations for each match of the template:</p><p></p><ol> <li data-xf-list-type="ol">all searches are applied</li> <li data-xf-list-type="ol">field values are extracted based on the template</li> <li data-xf-list-type="ol"> sublinks are scanned and field values are extracted</li> <li data-xf-list-type="ol">"modify" actions are applied on the extracted fields</li> <li data-xf-list-type="ol"> after all data for a channel has been processed it is stored to the database or saved to tvguide.xml</li> </ol></blockquote><p></p>
[QUOTE="arion_p, post: 529851, member: 45945"] This should work, but you don't need to replace "Episode " with an empty string, you can just remove it, as in: [code]<Modify channel="*" field="#EPISODE" search="Episode\s" action="Remove"></Modify>[/code]You could easily get the same result using the following: [code]<Search match="(?<=Episode\s)[0-9]{1,3}" field="#EPISODE" remove="false" /> <Search match="Episode\s[0-9]{1,3}" remove="true" />[/code]The first search will find the episode number and store only the number in #EPISODE (note the use of the "[I]positive lookbehind grouping construct[/I]"). The second search just removes the entire "Episode nnn" string, so it does not appear in other fields. If you use only the search with remove="true", it would only remove the episode number but not the string "Episode ". In general the order of operations for each match of the template: [LIST=1] [*]all searches are applied [*]field values are extracted based on the template [*] sublinks are scanned and field values are extracted [*]"modify" actions are applied on the extracted fields [*] after all data for a channel has been processed it is stored to the database or saved to tvguide.xml [/LIST] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Electronic Program Guide
WebEPG
Parsing Strings (regexp?)
Contact us
RSS
Top
Bottom