<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[substring highlight]]></title><description><![CDATA[<p>Hi all, first post here.</p><p>Is it possible to highlight a part of a string in some way? Doesn't really matter how it will be highlighted, whether via colour or with bold letters.</p><p>Thanks,<br /></p><p>Louizos</p>]]></description><link>https://community.troikatronix.com/topic/5680/substring-highlight</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 23:49:31 GMT</lastBuildDate><atom:link href="https://community.troikatronix.com/topic/5680.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 Jan 2019 14:49:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to substring highlight on Fri, 25 Jan 2019 15:21:19 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/3177">@louizos</a> well it may be easiest to strip these before being sent. I suggest looking at options in that side first. Perhaps unformatted is an option?</p><p>Regex is built into Javascript so it would be done in a short script. </p><p>If you can post a text example that you see getting I can workout some Regex to get the job done.</p>]]></description><link>https://community.troikatronix.com/post/33798</link><guid isPermaLink="true">https://community.troikatronix.com/post/33798</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Fri, 25 Jan 2019 15:21:19 GMT</pubDate></item><item><title><![CDATA[Reply to substring highlight on Mon, 21 Jan 2019 18:00:34 GMT]]></title><description><![CDATA[<p>I'm receiving the text as strings received via OSC. Not an Isadora-savvy, so can you provide an example as to how to use regular expressions to strip these? To be honest, I didn't even know there's a RegEx actor in Isadora.</p>]]></description><link>https://community.troikatronix.com/post/33769</link><guid isPermaLink="true">https://community.troikatronix.com/post/33769</guid><dc:creator><![CDATA[Louizos]]></dc:creator><pubDate>Mon, 21 Jan 2019 18:00:34 GMT</pubDate></item><item><title><![CDATA[Reply to substring highlight on Mon, 21 Jan 2019 14:36:49 GMT]]></title><description><![CDATA[<p>how are you getting the text? Can the html be stripped before Isadora?</p><p>Otherwise you may have to first remove any tags from the text... it should be possible to use regular expressions to remove anything found between '&lt;' and '&gt;'.</p><p>Or you could strip each tag individually.</p>]]></description><link>https://community.troikatronix.com/post/33766</link><guid isPermaLink="true">https://community.troikatronix.com/post/33766</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Mon, 21 Jan 2019 14:36:49 GMT</pubDate></item><item><title><![CDATA[Reply to substring highlight on Sun, 20 Jan 2019 19:26:46 GMT]]></title><description><![CDATA[<p></p><p>I did give Javascript a try with the Javascript actor. This is the code:</p>
<p>function main() {</p>
<p>  var result = '', str = arguments[0], start = arguments[1], end = arguments[2];</p>
<p>  result += (str.substring(0, start) + '&lt;span style="color:red"&gt;' + str.substring(start, end) + '&lt;/span&gt;' + str.substring(end, str.length))</p>
<p>  return result;</p>
<p>}</p>
<p>I do not understand though why I should convert everything to lower</p>
<p>case. Can't Javascript just parse the string at a specific point, being</p>
<p>case agnostic?</p>
<p>Anyway, the code I pasted above does parse the text according to its</p>
<p>second input, but this code does contain some HTML which doesn't work</p>
<p>with the Javascript actor. The output is a string parsed at the given</p>
<p>spot, but all the HTML stuff is displayed too. What do I have to write</p>
<p>to omit HTML altogether?</p><p><br />thanks</p><p>Louizos</p>]]></description><link>https://community.troikatronix.com/post/33762</link><guid isPermaLink="true">https://community.troikatronix.com/post/33762</guid><dc:creator><![CDATA[Louizos]]></dc:creator><pubDate>Sun, 20 Jan 2019 19:26:46 GMT</pubDate></item><item><title><![CDATA[Reply to substring highlight on Fri, 04 Jan 2019 02:07:26 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/3177">@Louizos</a> </p><p>The easiest way I can think to do this is to convert lowercase, to uppercase ( I would use Javascript it has great text parsing features). If you know all text is lowercase, you can then just return the text to lowercase when you go to hightlight another word/phrase.<br />The Text Draw actor doesn't offer format targeting, so there are limited options.<br />Another option, might be to Cut the text (only works if you have a know number of highlights... ideally 1) so that the first block is Non highlighted, then with another Text Draw Actor you place the Hightlighted text, and again flowup with another text draw actor with the remaining non-hightlighted text.<br /></p>]]></description><link>https://community.troikatronix.com/post/33702</link><guid isPermaLink="true">https://community.troikatronix.com/post/33702</guid><dc:creator><![CDATA[DusX]]></dc:creator><pubDate>Fri, 04 Jan 2019 02:07:26 GMT</pubDate></item></channel></rss>