<?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[Adding text at the end of only certain lines that end in a number (variation of numbers)]]></title><description><![CDATA[<p dir="auto">I am trying to convert my VTT subtitles to VTT with cues (adding positions at the end of the time code).<br />
Since I have currently not found a subtitling program with my specific needs for that format, I am looking into converting my VTT files with Notepad++ by adding a few lines.</p>
<p dir="auto">This is what I have so far:<br />
<img src="/assets/uploads/files/1625243428104-0eae9273-fad7-46d9-8893-0d3ce1272185-image.png" alt="0eae9273-fad7-46d9-8893-0d3ce1272185-image.png" class=" img-fluid img-markdown" /></p>
<ol>
<li>This is how the VTT looks when exported (only time stamp, no positioning)</li>
<li>This is how I NEED it to look (with the extra positioning cues at the end of the time stamp)</li>
<li>Searching for:  --&gt; <em>:</em>:<em>.</em> finds my timestamp perfectly! But when I want to add text on, it replaces that text with the literal characters:  “–&gt; <em>:</em>:<em>.</em>”<br />
EXAMPLE: <img src="/assets/uploads/files/1625243627022-f31b315d-6247-4b1e-925c-a2cbd2dcc15e-image.png" alt="f31b315d-6247-4b1e-925c-a2cbd2dcc15e-image.png" class=" img-fluid img-markdown" /></li>
<li>Trying to search for $ and then adding text at the end of the line puts the extra cues in too many places. I need them in every third line, right after the time stamp.<br />
EXAMPLE: <img src="/assets/uploads/files/1625243663671-58e81db0-9359-4a81-8d87-aa21533db1a3-image.png" alt="58e81db0-9359-4a81-8d87-aa21533db1a3-image.png" class=" img-fluid img-markdown" /></li>
<li>Searching for: \d{3}$ finds my the numbers at the end of a line perfectly! But once again, when I have to type that same thing into “replace”, it puts the literal characters: \d{3}$<br />
EXAMPLE: <img src="/assets/uploads/files/1625243569681-98420d29-652a-4362-a364-c869e77f792b-image.png" alt="98420d29-652a-4362-a364-c869e77f792b-image.png" class=" img-fluid img-markdown" /></li>
</ol>
<p dir="auto">I need to do hundreds of subtitle files with these conversions, so manually doing them is a big deal. I was hoping a simple numbers wildcard search/replace might work. Or anyone know another program that can search and replace like I need it to?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/21436/adding-text-at-the-end-of-only-certain-lines-that-end-in-a-number-variation-of-numbers</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 02:39:30 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/21436.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Jul 2021 16:40:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Sat, 03 Jul 2021 11:54:15 GMT]]></title><description><![CDATA[<p dir="auto">…OR…</p>
<p dir="auto">Train yourself such that whenever you are tempted to use <code>*</code> (from your command-line thinking), to use <code>.*?</code> instead – a rough regex equivalent, meaning: match 0 or more of any character, minimally.  The “minimally” part is there mainly for safety.  But of course this is just a rough guide, as things go deeper than that.</p>
<p dir="auto">BTW, this is all similar for <code>?</code> – this is different in regex than it is on the command line as well.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67657</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67657</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 03 Jul 2021 11:54:15 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Sat, 03 Jul 2021 11:19:08 GMT]]></title><description><![CDATA[<p dir="auto">Maybe the overall summary is:</p>
<p dir="auto">Do NOT think of command shell style file globbing <code>*</code> when you are formulating a regular expression, because it does not help.  I suppose that in some cases that is difficult, if you are more familiar with how <code>*</code> works on command lines than you are with regular expressions.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67655</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67655</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sat, 03 Jul 2021 11:19:08 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Sat, 03 Jul 2021 11:49:07 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/laura-stiles" aria-label="Profile: laura-stiles">@<bdi>laura-stiles</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/artie-finkelstein" aria-label="Profile: artie-finkelstein">@<bdi>artie-finkelstein</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">We can <strong>transform</strong> the <a class="plugin-mentions-user plugin-mentions-a" href="/user/laura-stiles" aria-label="Profile: laura-stiles">@<bdi>laura-stiles</bdi></a>’s regex <strong><code>--&gt; *:*:*.*</code></strong> with the following <strong>equivalent</strong> syntax :</p>
<pre><code class="language-z">(?x-s)  --&gt;  \x20{0,}  :{0,}  :{0,}  .{0,}   #  A very STRANGE regex !
------  ---  --------  -----  -----  -----   ------------------------- 
  A      B      C        D      E      F                 G
</code></pre>
<hr />
<p dir="auto">To <a class="plugin-mentions-user plugin-mentions-a" href="/user/laura-stiles" aria-label="Profile: laura-stiles">@<bdi>laura-stiles</bdi></a> :</p>
<p dir="auto">The <strong>first</strong> part <strong>A</strong> means that :</p>
<ul>
<li>
<p dir="auto">We’ll use the <strong>free-spacing</strong> mode <strong><code>(?x)</code></strong>. In this mode :</p>
<ul>
<li>
<p dir="auto">Any <strong>blank</strong> char, as <strong>space</strong> and <strong>tabulation</strong> are <strong>irrelevant</strong>. If you need to search for these characters, literally :</p>
<ul>
<li>
<p dir="auto"><strong>Escape</strong> them with a <strong><code>\</code></strong> character</p>
</li>
<li>
<p dir="auto">Use their <strong>regex</strong> equivalent <strong><code>\x20</code></strong> and <strong><code>\t</code></strong></p>
</li>
<li>
<p dir="auto">Use the braket syntax <strong><code>[ ]</code></strong> for <strong>space</strong></p>
</li>
</ul>
</li>
<li>
<p dir="auto">Any range of characters, after a first <strong><code>#</code></strong>, are <strong>irrelevant</strong> and seen as <strong>comment</strong> characters. ( refer to part <strong>G</strong> ). To search for a <strong>litteral</strong> <strong><code>#</code></strong> character, use, either, the <strong><code>\#</code></strong>, <strong><code>\x23</code></strong> or <strong><code>[#]</code></strong> syntaxes !</p>
</li>
</ul>
</li>
<li>
<p dir="auto">We won’t use the <strong>single line</strong> mode <strong><code>(?-s)</code></strong>. In this mode, the <strong><code>.</code></strong> <strong>dot</strong> regex character matches <strong>any</strong> character, even <strong>EOL</strong> characters. As we <strong>disable</strong> this mode, this means that a <strong>regex</strong> symbol <strong><code>.</code></strong> just matches a <strong>single standard</strong> char</p>
</li>
</ul>
<hr />
<p dir="auto">To <strong>All</strong> :</p>
<p dir="auto">If we consider the <strong>subject</strong> string <strong><code>--&gt; 00:00:07.625</code></strong>, we can say that :</p>
<ul>
<li>
<p dir="auto">Part <strong>B</strong> matches the <strong>literal</strong> string <strong><code>--&gt;</code></strong></p>
</li>
<li>
<p dir="auto">Part <strong>C</strong> matches the <strong>space</strong> char, <strong>after</strong> the <strong><code>--&gt;</code></strong> string</p>
</li>
<li>
<p dir="auto">Part <strong>D</strong> and <strong>E</strong> match <strong>nothing</strong> as <strong>no</strong> colon char <strong><code>:</code></strong> exists, after the <strong>space</strong> char</p>
</li>
<li>
<p dir="auto">Part <strong>F</strong>, <strong><code>.{0,}</code></strong>, matches <strong>any</strong> range, even <strong>empty</strong>, of <strong>standard</strong> chars so the <strong>remaining</strong> chars till the end of the line : <strong><code>00:00:07.625</code></strong></p>
</li>
<li>
<p dir="auto">Part <strong>G</strong> are <strong>comments</strong></p>
</li>
</ul>
<p dir="auto">You may <strong>verify</strong> my assertions by running the regex S/R , below, against the string <strong><code>--&gt; 00:00:07.625</code></strong> :</p>
<p dir="auto">SEARCH <strong><code>(?x-s) ( --&gt; ) ( \x20{0,} ) ( :{0,} ) ( :{0,} ) ( .{0,} )</code></strong></p>
<p dir="auto">REPLACE <strong><code>Group 1  &gt;\1&lt;\r\nGroup 2  &gt;\2&lt;\r\nGroup 3  &gt;\3&lt;\r\nGroup 4  &gt;\4&lt;\r\nGroup 5  &gt;\5&lt;\r\n</code></strong></p>
<hr />
<p dir="auto">Similarly, if we consider the <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a>’s <strong>subject</strong> string <strong><code>--&gt; ::::::::::::::::::dddddddddddfffffjjjjea::::zefjaj</code></strong> :</p>
<ul>
<li>
<p dir="auto">Part <strong>B</strong> matches the <strong>literal</strong> string <strong><code>--&gt;</code></strong></p>
</li>
<li>
<p dir="auto">Part <strong>C</strong> matches the <strong>space</strong> char, <strong>after</strong> the <strong><code>--&gt;</code></strong> string</p>
</li>
<li>
<p dir="auto">Part <strong>D</strong>, <strong><code>:{0,}</code></strong>, with a <strong>greedy</strong> quantifier, matches the <strong>greastest</strong> number of <strong>colon</strong> chars. So, the string <strong><code>::::::::::::::::::</code></strong></p>
</li>
<li>
<p dir="auto">Thus, the part <strong>E</strong>,<strong><code>:{0,}</code></strong>, matches <strong>zero</strong> <strong><code>:</code></strong> characters. So, an <strong>empty</strong> string !</p>
</li>
<li>
<p dir="auto">And the part <strong>F</strong>, <strong><code>.{0,}</code></strong>, matches all the <strong>remaining</strong> chars of the line. So the string <strong><code>dddddddddddfffffjjjjea::::zefjaj</code></strong></p>
</li>
</ul>
<p dir="auto">Again, <strong>verify</strong> these assertions by running the following <strong>regex</strong> S/R , below, against the string<br />
<strong><code>--&gt; ::::::::::::::::::dddddddddddfffffjjjjea::::zefjaj</code></strong> :</p>
<p dir="auto">SEARCH <strong><code>(?x-s) ( --&gt; ) ( \x20{0,} ) ( :{0,} ) ( :{0,} ) ( .{0,} )</code></strong></p>
<p dir="auto">REPLACE <strong><code>Group 1  &gt;\1&lt;\r\nGroup 2  &gt;\2&lt;\r\nGroup 3  &gt;\3&lt;\r\nGroup 4  &gt;\4&lt;\r\nGroup 5  &gt;\5&lt;\r\n</code></strong></p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto">P.S. :  Oh, <strong>Peter</strong> beat me at it ;-))</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67654</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67654</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sat, 03 Jul 2021 11:49:07 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 18:17:17 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></p>
<p dir="auto">Thanks for being a different voice saying similar things.<br />
I could see others reading my previous replies and thinking “yea, right, this guy is seriously clueless”.  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67647</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67647</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 02 Jul 2021 18:17:17 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 18:13:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/artie-finkelstein" aria-label="Profile: artie-finkelstein">@<bdi>artie-finkelstein</bdi></a> and <a class="plugin-mentions-user plugin-mentions-a" href="/user/laura-stiles" aria-label="Profile: Laura-Stiles">@<bdi>Laura-Stiles</bdi></a> ,</p>
<p dir="auto">As Alan says, the <code>--&gt; *:*:*.*</code> which first showed up in Laura’s screenshot and which Artie repeated does not do what Laura intended it to do, because it appears Laura was using * as though it were a Windows command line filename wildcard, to match "<code>--&gt;</code> followed by a space, then anything, then colon, then anything, then colon, then anything, then dot, then anything.  Regexes use different syntax than MS cmd.exe.</p>
<ul>
<li><code>--&gt;</code> matches that literal text</li>
<li><code> *</code> (space star) matches 0 or more space characters</li>
<li><code>:*</code> (colon star) matches 0 or more colon characters</li>
<li><code>.*</code> (dot star) matches 0 or more of any character</li>
</ul>
<p dir="auto">So it was matching “literal <code>--&gt;</code> followed by 0 or more spaces followed by 0 or more colons followed by 0 or more colons followed by 0 or more of any character”.  “0 or more” of the spaces and colons mean it can get to the space beyond the <code>--&gt;</code>, then the “0 or more of any character” matches the rest of the line, whatever it happens to be. When you piece it all together, Alan’s brief description of “Basically, the regex will match --&gt; followed by anything” sums it up.</p>
<p dir="auto">So what was “scary” about the regex is that it <em>appeared</em> to work, but for all the wrong reasons, and to use it thinking that it was matching the pattern that was intended is foolhardy.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/artie-finkelstein" aria-label="Profile: artie-finkelstein">@<bdi>artie-finkelstein</bdi></a> ,</p>
<blockquote>
<p dir="auto">I won’t submit suggestions I haven’t tested,</p>
</blockquote>
<p dir="auto">But you obviously didn’t test it against edge cases, because otherwise you would have seen that it matched a line with a single <code>--&gt;</code> and nothing else.</p>
<p dir="auto">When giving help for a regex, never share a regex that you only test on data that matches, without testing on data that shouldn’t match to make sure you don’t have a fundamental flaw – like a regex that happens to match this one piece of data without meeting any of the criteria given in the problem description!</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laura-stiles" aria-label="Profile: Laura-Stiles">@<bdi>Laura-Stiles</bdi></a>,</p>
<p dir="auto">When asking for help with a regex, never share only data that matches and always include data that shouldn’t match, making sure you’ve thought about edge cases. The answers you get will be much better that way, because the people who are helping you will be able to test against both matching and non-matching data.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67645</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67645</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 02 Jul 2021 18:13:39 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 17:37:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> said in <a href="/post/67635">Adding text at the end of only certain lines that end in a number (variation of numbers)</a>:</p>
<blockquote>
<p dir="auto"><code>--&gt; *:*:*.*</code></p>
</blockquote>
<p dir="auto">So a specific example:</p>
<p dir="auto">The above regex will match this text: <code>--&gt; ::::::::::::::::::dddddddddddfffffjjjjea::::zefjaj</code> which is clearly only like a timestamp in that it has the <code>--&gt; </code> to its left!</p>
<p dir="auto">Basically, the regex will match <code>--&gt; </code> followed by anything!!!  DANGEROUS!</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/artie-finkelstein" aria-label="Profile: artie-finkelstein">@<bdi>artie-finkelstein</bdi></a> said:</p>
<blockquote>
<p dir="auto">I agree it’s scary, as it relies on the regex engine in use not having grown enough to use even more non-alphabetic characters as operators</p>
</blockquote>
<p dir="auto">I’m not following that.<br />
I think it is scary because it misleads one that is not adept in regex that it is doing something other than it is.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67643</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67643</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:37:37 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 17:31:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a><br />
Thanks for the warnings!</p>
<p dir="auto">I agree it’s scary, as it relies on the regex engine in use not having grown enough to use even more non-alphabetic characters as operators (this is an observation on regex in general, not Boost or Notepad++ in particular).</p>
<p dir="auto">I have discovered when using a regex to:</p>
<ol>
<li>save the file before starting</li>
<li>not be afraid to use the undo command</li>
<li>be willing to admit defeat and abandon the edit session (without saving)</li>
<li>start again</li>
</ol>
<p dir="auto">I’m one of those grey beards that finds it easier to go for it (using the above steps) rather than try to sanitize my way around this weeks/months/years new regex schema.  I find regex hard enough without having to keep straight the countless variants that have been developed over the last 40+ years.</p>
<p dir="auto">I won’t submit suggestions I haven’t tested, and will definitely stay out of the jungles some of the posters fearlessly wade into.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67642</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67642</guid><dc:creator><![CDATA[artie-finkelstein]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:31:54 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 17:30:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laura-stiles" aria-label="Profile: Laura-Stiles">@<bdi>Laura-Stiles</bdi></a> said in <a href="/post/67638">Adding text at the end of only certain lines that end in a number (variation of numbers)</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/artie-finkelstein" aria-label="Profile: artie-finkelstein">@<bdi>artie-finkelstein</bdi></a> This also worked great for me! I love the simplicity of it, too! Thank you!</p>
</blockquote>
<p dir="auto">Again, a word of warning:  That was a dangerous solution (based upon your original input) that is wrong for a number of reasons.  It uses the <code>*</code> in totally the wrong way (more like a command line file wildcard than a regular expression pattern repeater).  It just so happens to be “okay” for this application.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67641</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67641</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:30:42 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 17:27:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laura-stiles" aria-label="Profile: Laura-Stiles">@<bdi>Laura-Stiles</bdi></a> said in <a href="/post/67639">Adding text at the end of only certain lines that end in a number (variation of numbers)</a>:</p>
<blockquote>
<p dir="auto">it gave me an error “zero length match”</p>
</blockquote>
<p dir="auto">That’s not an error message, it’s an informational message, with a little arrow indicator at where the match occurred.<br />
As you might think, if you find a zero length match, when you replace it, it doesn’t replace anything existing.<br />
But what it does do, is uses the location where the little arrow points as an <em>insertion</em> point for the replacement text.<br />
So… you could use my expression for <em>Find what</em> , with a <em>Replace with</em> of <code> line:90%,end position:50%,center align:center</code> to get at least close to what you want.</p>
<p dir="auto">See where the little arrow points?:</p>
<p dir="auto"><img src="/assets/uploads/files/1625246810238-efa57c59-de2a-429e-8dbc-f883a822d3cf-image.png" alt="efa57c59-de2a-429e-8dbc-f883a822d3cf-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">One little caveat is that you would have to use <em>Replace All</em> with a find expression that uses <code>\K</code> like this one does.  <em>Replace</em> of each occurrence one at a time doesn’t work (Notepad++ bug).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67640</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67640</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:27:42 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 17:20:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> Mmmm, I wasn’t able to get this solution to work (copying/pasting your suggestions into “Find” and typing in my text in “replace”. It gave me an error “zero length match”. I must admit, while I understood the other suggestions (and they worked), I don’t understand this one well, which is probably why I’m executing it wrong. Sorry, but thank you for the help!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67639</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67639</guid><dc:creator><![CDATA[Laura Stiles]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:20:34 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 17:18:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/artie-finkelstein" aria-label="Profile: artie-finkelstein">@<bdi>artie-finkelstein</bdi></a> This also worked great for me! I love the simplicity of it, too! Thank you!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67638</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67638</guid><dc:creator><![CDATA[Laura Stiles]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:18:45 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 17:18:05 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> This worked perfectly! I have to admit, this is my very first post to any internet forum with a question - and I’m blown away by the multiple working solutions that came so fast. Thank you!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67637</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67637</guid><dc:creator><![CDATA[Laura Stiles]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:18:05 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 17:10:50 GMT]]></title><description><![CDATA[<p dir="auto">My suggestion joins the party:  search for <code>\d\d:\d\d:\d\d\.\d{3} --&gt; \d\d:\d\d:\d\d\.\d{3}\K</code> and replace it simply with the text you want to add in.</p>
<p dir="auto">There is a lot of scaryness going on with this suggestion: <code>(--&gt; *:*:*.*)</code> but amazingly it does seem to match what is desired.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67635</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67635</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:10:50 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 17:02:16 GMT]]></title><description><![CDATA[<p dir="auto">This is a case of needing the grouping operator ‘(  )’</p>
<p dir="auto">Add parenthesis around the entire search string (Find what:) in your first example:<br />
<code>(--&gt; *:*:*.*)</code></p>
<p dir="auto">And replace the reference to that same string in the replacement with:<br />
<code>\1</code></p>
<p dir="auto">which means when searching: match this as a group<br />
and when replacing: place the first group here<br />
This can be repeated with additional parenthetic groups and numerically increasing replacement values (which can be used in any order).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/67633</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67633</guid><dc:creator><![CDATA[artie-finkelstein]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:02:16 GMT</pubDate></item><item><title><![CDATA[Reply to Adding text at the end of only certain lines that end in a number (variation of numbers) on Fri, 02 Jul 2021 17:00:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laura-stiles" aria-label="Profile: Laura-Stiles">@<bdi>Laura-Stiles</bdi></a> ,</p>
<p dir="auto">Thanks for showing what you’ve tried, and your thought process.  That was helpful.</p>
<p dir="auto">I would use a combination of your 1st and 5th option, plus knowing the magic of <a href="https://npp-user-manual.org/docs/searching/#substitution-escape-sequences" rel="nofollow ugc">substitution escapes</a>, where if you use <code>${0}</code> in the replacement, it will insert the original matched text at that location.</p>
<ul>
<li>FIND = <code>--&gt; \d{2}:\d{2}:\d{2}\.\d{3}$</code></li>
<li>REPLACE = <code>${0} line:90%,end position:50%,center align:center</code></li>
<li>MODE = regular expression</li>
</ul>
<p dir="auto">so</p>
<pre><code>00:00:02.388 --&gt; 00:00:07.625
some text goes here

00:00:08.738 --&gt; 00:00:11.111
some text goes here
</code></pre>
<p dir="auto">becomes</p>
<pre><code>00:00:02.388 --&gt; 00:00:07.625 line:90%,end position:50%,center align:center
some text goes here

00:00:08.738 --&gt; 00:00:11.111 line:90%,end position:50%,center align:center
some text goes here
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/67632</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/67632</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 02 Jul 2021 17:00:24 GMT</pubDate></item></channel></rss>