<?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[Removing Text Before and After dialogue.]]></title><description><![CDATA[<p dir="auto">I want to remove everything before and after each of the Chinese dialogues so that the chinese texts are all that remains. I’d also like for them to have 1 blank line in-between them so they are readable.</p>
<p dir="auto">This XML file does not appear to have any style information associated with it. The document tree is shown below.<br />
&lt;!--    *** Created by ansal Gibs - Brg-fission-2B-01***    --&gt;<br />
&lt;!--    *** 2023-Aug-28 ***    --&gt;<br />
&lt;!--    *** Aspect ratio 4096×1600 ***    --&gt;<br />
&lt;!--    *** 24fps *** --&gt;<br />
&lt;!--    *** Exporter: 2D_IOP_Text_2K_Ransly_Kabanos_Font_Comp *** --&gt;<br />
&lt;DCSubtitle Version=“1.1”&gt;<br />
&lt;SubtitleID&gt;da75c3b7-4f-401-d3a&lt;/SubtitleID&gt;<br />
&lt;MovieTitle&gt;Bricks&lt;/MovieTitle&gt;<br />
&lt;ReelNumber&gt;1&lt;/ReelNumber&gt;<br />
&lt;Language&gt;cmn-hans&lt;/Language&gt;<br />
&lt;LoadFont Id=“Font1” URI=“Bricks_STT_1_cmn_R1.ttf”/&gt;<br />
&lt;Font Id=“Font1” Color=“FFFFFFFF” Effect=“border” EffectColor=“FF000000” Size=“42”&gt;<br />
&lt;Subtitle SpotNumber=“1” TimeIn=“00:02:18:146” TimeOut=“00:02:20:115” FadeUpTime=“0” FadeDownTime=“0”&gt;<br />
&lt;Text HAlign=“center” HPosition=“0.0000” VAlign=“bottom” VPosition=“10.0000”&gt;这里只有一只&lt;/Text&gt;<br />
&lt;/Subtitle&gt;<br />
&lt;Subtitle SpotNumber=“2” TimeIn=“00:02:20:208” TimeOut=“00:02:22:083” FadeUpTime=“0” FadeDownTime=“0”&gt;<br />
&lt;Text HAlign=“center” HPosition=“0.0000” VAlign=“bottom” VPosition=“10.0000”&gt;它们造出来的时候是一对&lt;/Text&gt;<br />
&lt;/Subtitle&gt;<br />
&lt;Font Italic=“yes”&gt;卡·克登场&lt;/Font&gt;<br />
&lt;/Text&gt;</p>
<p dir="auto">I’m very new to Notepad++. Any help will be appreciated alot!!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24941/removing-text-before-and-after-dialogue</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 12:37:11 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24941.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 19 Sep 2023 18:23:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Removing Text Before and After dialogue. on Wed, 20 Sep 2023 16:50:01 GMT]]></title><description><![CDATA[<p dir="auto">I want to Thank you guys for this. Yesterday I tried Peter’s code first and it worked but there were still some things left behind. Inevitably i found a wayto cancel them out so great work either way.</p>
<p dir="auto">Terry for some reason My Notepad++ freezes when i used your method to replace all.</p>
<p dir="auto">Guy038, yours worked perfectly. It got rid of everything and also spaced out the lines. I intended to put them into a word doc and realized that word automatically spaces out lines so it seems I put you guys through a bit more work than needed but those codes got the job done. I won’t be needing further help on this i believe.</p>
<p dir="auto">Thanks again and warm regards</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89377</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89377</guid><dc:creator><![CDATA[Borderless Media]]></dc:creator><pubDate>Wed, 20 Sep 2023 16:50:01 GMT</pubDate></item><item><title><![CDATA[Reply to Removing Text Before and After dialogue. on Wed, 20 Sep 2023 08:03:04 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29376">@borderless-media</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@peterjones</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12335">@terry-R</a> and <strong>All</strong>,</p>
<p dir="auto">An <strong>alternate</strong> solution to the <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12335">@terry-R</a>’s one could be :</p>
<ul>
<li>
<p dir="auto"><strong>Open</strong> your file or select the <strong>right</strong> tab</p>
</li>
<li>
<p dir="auto">Move to the <strong>very beginning</strong> of the file ( <strong><code>Ctrl + Home</code></strong> )</p>
</li>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
</li>
<li>
<p dir="auto"><strong>Un-tick</strong> all the <strong>box</strong> options</p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>[^\x{4E00}-\x{9FFF}]+|(?-s)(.+)(?=&lt;/)</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>?1$0\r\n\r\n</code></strong>    ( or    <strong><code>?1$0\n\n</code></strong> if you deal with <strong><code>Unix</code></strong> files )</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> <strong>search</strong> mode</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
<p dir="auto">Here you are !</p>
<hr />
<p dir="auto">I must admit, that I <strong>initially</strong> did <strong>not</strong> think about the <strong><code>Chinese Characters</code></strong> range. Special thanks for that <strong>clever</strong> idea, <strong>Terry</strong> ;-))</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto"><strong>P.S.</strong> :</p>
<p dir="auto">This <strong>regex</strong> S/R works also, if a range of <strong>Chinese</strong> chars is split on  <strong>several</strong> lines. After the replacement, this range is displayed in a <strong>single</strong> line, again !</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89368</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89368</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 20 Sep 2023 08:03:04 GMT</pubDate></item><item><title><![CDATA[Reply to Removing Text Before and After dialogue. on Tue, 19 Sep 2023 20:58:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29376">@Borderless-Media</a> said in <a href="/post/89355">Removing Text Before and After dialogue.</a>:</p>
<blockquote>
<p dir="auto">I want to remove everything before and after each of the Chinese dialogues so that the Chinese texts are all that remains. I’d also like for them to have 1 blank line in-between them so they are readable</p>
</blockquote>
<p dir="auto">I think I may have the answer. I cannot claim all the credit, I looked to an old post by <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a> to find out the hex range of Chinese characters first. I then made an assumption with the example you provided. I assumed also that in any group of Chinese characters they commenced with a Chinese character and ended at the <code>&lt;</code> character. That was because I noted that in the last group of Chinese characters there also appeared a space (see the raised <code>.</code>)</p>
<p dir="auto">Anyways, for what it is, it did produce the desired result (including a blank line after each group of Chinese characters.</p>
<p dir="auto">Using the Replace function and search mode set to “regular expression” we have<br />
Find What:<code>(([\x{4E00}-\x{9FFF}].+?)(?=&lt;))|.\R?</code><br />
Replace with:<code>?{1}${1}\r\n\r\n</code></p>
<p dir="auto">For an explanation we have:<br />
(([\x{4E00}-\x{9FFF}].+?)(?=&lt;)) - find a Chinese character (at the next position), if so then continue finding characters and stop when the next one is a <code>&lt;</code>.<br />
|.\R?` - this is alternation so if the previous code didn’t find a Chinese character then we grab this (one) character and any possible EOL (end of line)<br />
?{1}${1}\r\n\t\n - in replacement if the first part of the find regex did find characters (group 1) we will return that group of Chinese characters followed by the end-of-line twice, this adds a carriage return &amp; line feed behind the Chinese character group and then a second carriage return &amp; line feed. The alternate code has no parenthesis around it (so no group definition) and that is because we want to consume it (destroy/delete), not return any of those characters.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/89358</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89358</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Tue, 19 Sep 2023 20:58:38 GMT</pubDate></item><item><title><![CDATA[Reply to Removing Text Before and After dialogue. on Tue, 19 Sep 2023 18:39:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29376">@Borderless-Media</a> said in <a href="/post/89355">Removing Text Before and After dialogue.</a>:</p>
<blockquote>
<p dir="auto">I want to remove everything before and after each of the Chinese dialogues so that the chinese texts are all that remains. I’d also like for them to have 1 blank line in-between them so they are readable.</p>
</blockquote>
<p dir="auto">If you really want to delete all the tags, and just leave things that aren’t part of the tags, it’s not that hard to do with regex.  So assuming you have a backup of your data, what I would suggest is:</p>
<ol>
<li>Delete from each <code>&lt;</code> to its corresponding <code>&gt;</code> (assuming you don’t have any nested; normally you don’t in valid XML)<br />
FIND = <code>(?s)&lt;.*?&gt;</code><br />
REPLACE = <code>\r\n</code><br />
SEARCH MODE = Regular Expression<br />
REPLACE ALL
<ul>
<li>this finds each smallest <code>&lt;...&gt;</code> pair, and replaces them with a newline.  This will likely leave multiple newlines between some pieces of text</li>
</ul>
</li>
<li>Combine multiple newlines into one:<br />
FIND = <code>(\r\n)+</code><br />
REPLACE = <code>\r\n</code> (if you just want a single line break) or <code>\r\n\r\n</code> (if you want double-spaced lines)<br />
SEARCH MODE = Regular Expression<br />
REPLACE ALL</li>
</ol>
<p dir="auto">What this does do: gets rid of tags (ie, the stuff between <code>&lt;...&gt;</code> pairs) but leaves <em>all</em> content.</p>
<p dir="auto">What this does <strong>not</strong> do: verify whether the stuff that’s left is Chinese text.  If you had Russian or Arabic or Hebrew or English or … elsewhere, it would still be there after this.</p>
<p dir="auto">----</p>
<h3>Useful References</h3>
<ul>
<li><a href="https://community.notepad-plus-plus.org/topic/21965/please-read-before-posting">Please Read Before Posting</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/22022/template-for-search-replace-questions">Template for Search/Replace Questions</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts">Formatting Forum Posts</a></li>
<li><a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">Notepad++ Online User Manual: Searching/Regex</a></li>
<li><a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regular-expressions-regex-documentation">FAQ: Where to find other regular expressions (regex) documentation</a></li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/89356</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/89356</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 19 Sep 2023 18:39:39 GMT</pubDate></item></channel></rss>