<?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[RegEx issues]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I'm trying to colorize an hex log, and I find a estrange behaviors.<br />
E.g. I can colorize ok some bytes:<br />
<img src="/forum/assets/uploads/files/1730305175859-2688f46f-0ccb-4798-88b5-22dacb6dd10a-image.png" alt="2688f46f-0ccb-4798-88b5-22dacb6dd10a-image.png" class=" img-responsive img-markdown" width="1036" height="657" /></p>
<p dir="auto">but others are not colorized at all<br />
<img src="/forum/assets/uploads/files/1730305212275-1b2451ef-d820-4ceb-aba3-b5a1e9f09cc9-image.png" alt="1b2451ef-d820-4ceb-aba3-b5a1e9f09cc9-image.png" class=" img-responsive img-markdown" width="1075" height="675" /></p>
<p dir="auto">and, in a weird case, a value (0x77) colorize two bytes (0x77 and 0x57)<br />
<img src="/forum/assets/uploads/files/1730305285716-f86c427c-f0c8-44c8-8539-926dc408cc87-image.png" alt="f86c427c-f0c8-44c8-8539-926dc408cc87-image.png" class=" img-responsive img-markdown" width="1062" height="741" /></p>
<p dir="auto">It seems that colorizes better low values (below 0x80) than high ones.</p>
<p dir="auto">Another thing that could affect (?), could be that the log has been captured using "odd" parity... but ... not sure about it, as it colorizes correctly if I use 0x01 or 0x03<br />
<img src="/forum/assets/uploads/files/1730305479365-c39a59f2-2ed9-4a98-bd5a-4e525eb8b86d-image.png" alt="c39a59f2-2ed9-4a98-bd5a-4e525eb8b86d-image.png" class=" img-responsive img-markdown" width="928" height="403" /><br />
<img src="/forum/assets/uploads/files/1730305498648-3bc2eb3d-1eef-4dea-867a-53dc57a5b52d-image.png" alt="3bc2eb3d-1eef-4dea-867a-53dc57a5b52d-image.png" class=" img-responsive img-markdown" width="912" height="358" /></p>
<p dir="auto">Regards!<br />
Josep</p>
]]></description><link>http://64.23.185.212/forum/topic/321/regex-issues</link><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 17:40:36 GMT</lastBuildDate><atom:link href="http://64.23.185.212/forum/topic/321.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Oct 2024 16:27:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RegEx issues on Wed, 06 Nov 2024 02:11:35 GMT]]></title><description><![CDATA[<p dir="auto">No worries; I'm happy to hear that the issue is resolved now!</p>
<p dir="auto">If you tried the Latin-1 and still saw unexpected coloring, it could have been the case sensitivity issue -- this has caught me off guard a few times as well.</p>
<p dir="auto">Regarding why we use UTF-8 in regex by default. UTF-8 is the default encoding across IO Ninja (log engine, terminal, transmit pane, etc). So it makes sense to use UTF-8 in regex for the sake of consistency. But here we have a dilemma. If the regex engine uses UTF-8 by default, then individual bytes could be uncolored -- RE2 could treat them as part of a UTF-8 sequence. If, on the other hand, we use Latin-1 by default, then multi-byte Unicode characters could be uncolored.</p>
<p dir="auto">I guess we could try to be smarter and automatically choose Latin-1 or UTF-8 based on the pattern (i.e., force Latin-1 when the pattern contains <code>\xHH</code>, force UTF-8 when the pattern contains multi-byte Unicode characters). Forcing the encoding is not a good thing, though. Maybe have an "Auto" option or something like that.</p>
<p dir="auto">If you encounter anything else, please let me know. Your feedback over the years has been invaluable—thank you so much!</p>
]]></description><link>http://64.23.185.212/forum/post/706</link><guid isPermaLink="true">http://64.23.185.212/forum/post/706</guid><dc:creator><![CDATA[Vladimir]]></dc:creator><pubDate>Wed, 06 Nov 2024 02:11:35 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx issues on Fri, 01 Nov 2024 10:04:50 GMT]]></title><description><![CDATA[<p dir="auto">Hello Vladimir,<br />
you are right! but I would have sworn I tried that (in fact, after writing the post I thought I have forgoten comment that "the issue" seems related to an UTF issue)<br />
Sorry and thank you!<br />
Regards<br />
Josep</p>
]]></description><link>http://64.23.185.212/forum/post/705</link><guid isPermaLink="true">http://64.23.185.212/forum/post/705</guid><dc:creator><![CDATA[Jose Marro]]></dc:creator><pubDate>Fri, 01 Nov 2024 10:04:50 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx issues on Fri, 01 Nov 2024 01:36:56 GMT]]></title><description><![CDATA[<p dir="auto">Also, regarding this:</p>
<blockquote>
<p dir="auto">and, in a weird case, a value (0x77) colorize two bytes (0x77 and 0x57)</p>
</blockquote>
<p dir="auto">This is actually fine. "Case sensitive" is set to OFF, so 0x77 (W) and 0x57 (w) both match.</p>
]]></description><link>http://64.23.185.212/forum/post/704</link><guid isPermaLink="true">http://64.23.185.212/forum/post/704</guid><dc:creator><![CDATA[Vladimir]]></dc:creator><pubDate>Fri, 01 Nov 2024 01:36:56 GMT</pubDate></item><item><title><![CDATA[Reply to RegEx issues on Fri, 01 Nov 2024 01:31:12 GMT]]></title><description><![CDATA[<p dir="auto">Hello Josep,</p>
<p dir="auto">You have to set "Force Latin-1 encoding" when you are colorizing raw byte sequences. Otherwise, RE2 will try to decode UTF-8, and this yields unexpected results when the data stream (or the pattern) contains invalid UTF-8 sequences -- which is a common thing in raw IO streams.</p>
<p dir="auto">As a matter of fact, I think we should change the default behaviour -- i.e., use Latin-1 by default and only UTF-8-decode when explicitly asked for.</p>
]]></description><link>http://64.23.185.212/forum/post/703</link><guid isPermaLink="true">http://64.23.185.212/forum/post/703</guid><dc:creator><![CDATA[Vladimir]]></dc:creator><pubDate>Fri, 01 Nov 2024 01:31:12 GMT</pubDate></item></channel></rss>