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
Products
TV-Server
Tweaking DVB EPG
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="hurley" data-source="post: 1140405" data-attributes="member: 151395"><p>Try using 'lookarounds' <a href="http://www.rexegg.com/regex-lookarounds.html" target="_blank">http://www.rexegg.com/regex-lookarounds.html</a></p><p></p><p><em>Regex Expression:</em> <strong>(?<=[a-z])(?=[A-Z])</strong> <em>Replace with:</em> <strong>\r\n</strong></p><p></p><p>** The \r\n doesn't seem to be getting processed by the textbox in the filter tester, but it should work for the actual data. I'll fix the textbox in next update.</p><p></p><p>Edit: Just tested this in practice with a description filter. (I assume that's where you want to use it!?)</p><p>The \r\n gets inserted between any lower case char followed by upper case char but it seems <span style="font-size: 9px"><span style="color: #bfbfbf">MediaPortal doesn't</span></span> Edit: <em>My sloppy code didn't</em> process the \r\n correctly. The \r gets removed and the \n gets printed to the description text.</p><p>Will have to do some digging to see whats going on there...</p><p>---</p><p>Fixed below in v0.1.0.41</p><p>Though you might have occasional problems if there's a name like McGuire or DeCristo etc.. in the description text.</p><p>This might work better though:</p><p></p><p><em>Regex Expression:</em> <strong>(?<=[^A-Z][a-z])(?=[A-Z])</strong> <em>Replace with:</em> <strong>\r\n</strong></p><p></p><p>-----------------------------------------------------------------------------------------------------------------</p><p></p><p>Edit @<a href="https://forum.team-mediaportal.com/members/vasilich.97516/" target="_blank">Vasilich</a></p><p>I've since discovered a much simpler and more efficient way to do this in line with your original idea of using substitutions:</p><p></p><p>Regex Expression: <strong>([^A-Z][a-z])([A-Z])</strong> Replace with: <strong>$1\r\n$2</strong></p><p></p></blockquote><p></p>
[QUOTE="hurley, post: 1140405, member: 151395"] Try using 'lookarounds' [URL]http://www.rexegg.com/regex-lookarounds.html[/URL] [I]Regex Expression:[/I] [B](?<=[a-z])(?=[A-Z])[/B] [I]Replace with:[/I] [B]\r\n[/B] ** The \r\n doesn't seem to be getting processed by the textbox in the filter tester, but it should work for the actual data. I'll fix the textbox in next update. Edit: Just tested this in practice with a description filter. (I assume that's where you want to use it!?) The \r\n gets inserted between any lower case char followed by upper case char but it seems [SIZE=1][COLOR=#bfbfbf]MediaPortal doesn't[/COLOR][/SIZE] Edit: [I]My sloppy code didn't[/I] process the \r\n correctly. The \r gets removed and the \n gets printed to the description text. Will have to do some digging to see whats going on there... --- Fixed below in v0.1.0.41 Though you might have occasional problems if there's a name like McGuire or DeCristo etc.. in the description text. This might work better though: [I]Regex Expression:[/I] [B](?<=[^A-Z][a-z])(?=[A-Z])[/B] [I]Replace with:[/I] [B]\r\n[/B] ----------------------------------------------------------------------------------------------------------------- Edit @[URL='https://forum.team-mediaportal.com/members/vasilich.97516/']Vasilich[/URL] I've since discovered a much simpler and more efficient way to do this in line with your original idea of using substitutions: Regex Expression: [B]([^A-Z][a-z])([A-Z])[/B] Replace with: [B]$1\r\n$2[/B] [B][/B] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Products
TV-Server
Tweaking DVB EPG
Contact us
RSS
Top
Bottom