<?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[User defined language - recognize date and time stamp]]></title><description><![CDATA[<p dir="auto">Hi there,</p>
<p dir="auto">I try to highlight the date and time stamp in a txt-file by applying UDL, e.g.:</p>
<p dir="auto">2020-03-31 09:19:44</p>
<p dir="auto">Unfortunately, it does not work how I want it. I can highlight all numbers, but<br />
in my case I only want to highlight date and time stamp.</p>
<p dir="auto">Does anyone has an idea?</p>
<p dir="auto">Thank you and best regards!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19165/user-defined-language-recognize-date-and-time-stamp</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 06:03:56 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19165.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Apr 2020 11:04:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to User defined language - recognize date and time stamp on Tue, 07 Apr 2020 21:51:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ninon_1977" aria-label="Profile: Ninon_1977">@<bdi>Ninon_1977</bdi></a></p>
<p dir="auto">first you have to install PythonScript plugin from PluginAdmin.<br />
Then click Plugins-&gt;PythonScript-&gt;New Script<br />
give it a meaningful name and copy the content into the newly created document.</p>
<p dir="auto">Then follow the instructions in the script.<br />
Change the lexername and the regexes in the configuration area.<br />
Lexername must be exactly the same as shown in the language menu<br />
and use the regex from <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a></p>
<p dir="auto">Something like this</p>
<pre><code class="language-py">regexes[(0, (79, 175, 239))] = (r'\d{4}-\d{2}-\d{2} \d{2}:', 0)
</code></pre>
<p dir="auto">all other regexes from the example can be commented.</p>
<p dir="auto">(79, 175, 239) &lt;-- this is the rgb color</p>
<p dir="auto">Execute the script via Plugins-&gt;Python Script-&gt;Scripts-&gt;YOUR_SCRIPT<br />
(needs to be done once per npp start only)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52264</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52264</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Tue, 07 Apr 2020 21:51:01 GMT</pubDate></item><item><title><![CDATA[Reply to User defined language - recognize date and time stamp on Tue, 07 Apr 2020 20:50:44 GMT]]></title><description><![CDATA[<p dir="auto">Hi :-)</p>
<p dir="auto">I guess "<a href="http://EnhanceUDLLexer.py" rel="nofollow ugc">EnhanceUDLLexer.py</a> " could help me, but unfortunately I am not sure how to get it running…<br />
I downloaded the file and renamed it to “<a href="http://EnhanceUDLLexer.py" rel="nofollow ugc">EnhanceUDLLexer.py</a>” - I changed this part:</p>
<p dir="auto">self.lexer_name = ‘dummy_Log’</p>
<p dir="auto">But how can I use it now?<br />
Thank you!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52259</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52259</guid><dc:creator><![CDATA[Ninon_1977]]></dc:creator><pubDate>Tue, 07 Apr 2020 20:50:44 GMT</pubDate></item><item><title><![CDATA[Reply to User defined language - recognize date and time stamp on Mon, 06 Apr 2020 13:06:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a><br />
Of course, I simply assumed that the extension of years and hours could be derived from my example :-D<br />
But of course I understand what you mean. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52204</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52204</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 06 Apr 2020 13:06:46 GMT</pubDate></item><item><title><![CDATA[Reply to User defined language - recognize date and time stamp on Mon, 06 Apr 2020 13:01:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a> said in <a href="/post/52199">User defined language - recognize date and time stamp</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ninon_1977" aria-label="Profile: Ninon_1977">@<bdi>Ninon_1977</bdi></a> said in <a href="/post/52192">User defined language - recognize date and time stamp</a>:</p>
<blockquote>
<p dir="auto">2020-03-31 09:19:44</p>
</blockquote>
<p dir="auto">Maybe by defining <code>"2020-"</code> and <code>"09:"</code> as keywords with checked prefix mode?</p>
</blockquote>
<p dir="auto">Interesting idea… though I would assume, despite the OP’s lack of information, that it’s possible to have other years (if the txt file goes back more than a few months), and highly probable that it will have hours other than <code>09</code>. :-)</p>
<p dir="auto">If this were something I were trying to solve, I’d use your <code>EnhanceUDLLexer.py</code> <a href="https://notepad-plus-plus.org/community/topic/17134/enhance-udl-lexer/31" rel="nofollow ugc">in this linked post</a>, and define a regex similar to <code>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}</code> – though the OP may have to adjust that regex, depending on whether or not smaller numbers are <em>always</em> zero-prefixed, or only <em>sometimes</em> zero-prefixed (I would hope the former, which would match my regex…)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52202</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52202</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 06 Apr 2020 13:01:25 GMT</pubDate></item><item><title><![CDATA[Reply to User defined language - recognize date and time stamp on Mon, 06 Apr 2020 12:49:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ninon_1977" aria-label="Profile: Ninon_1977">@<bdi>Ninon_1977</bdi></a> said in <a href="/post/52192">User defined language - recognize date and time stamp</a>:</p>
<blockquote>
<p dir="auto">2020-03-31 09:19:44</p>
</blockquote>
<p dir="auto">Maybe by defining <code>"2020-"</code> and <code>"09:"</code> as keywords with checked prefix mode?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/52199</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/52199</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 06 Apr 2020 12:49:17 GMT</pubDate></item></channel></rss>