<?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[Mark all text who have word searched]]></title><description><![CDATA[<p dir="auto">I have a text file like the folowing one:</p>
<pre><code>#TEST Random TEXT |

#TEST Random TEXT:
Random TEXT special Random TEXT |

#TEST Random TEXT:
Random TEXT  |

#TEST Random TEXT:
Random TEXT special Random TEXT
Random TEXT 
Random TEXT 
Random TEXT  |
</code></pre>
<p dir="auto">I want to mark text who contain this word “special”<br />
The result can be :</p>
<pre><code>#TEST Random TEXT:
Random TEXT special Random TEXT |

#TEST Random TEXT:
Random TEXT special Random TEXT
Random TEXT 
Random TEXT 
Random TEXT  |
</code></pre>
<p dir="auto">I trying to use this<br />
<code>^(#TEST).+?special+?\|$</code><br />
but the result not correct</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22964/mark-all-text-who-have-word-searched</link><generator>RSS for Node</generator><lastBuildDate>Fri, 07 Aug 2026 12:59:52 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22964.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 08 May 2022 11:43:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mark all text who have word searched on Mon, 09 May 2022 11:06:39 GMT]]></title><description><![CDATA[<p dir="auto">Very wonderful ,<br />
Thanks a lot <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> ,<br />
that make me love notepad++ more !!</p>
<p dir="auto"><strong><code>I am grateful for your support.</code></strong></p>
]]></description><link>https://community.notepad-plus-plus.org/post/76696</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76696</guid><dc:creator><![CDATA[ElBriak Badr]]></dc:creator><pubDate>Mon, 09 May 2022 11:06:39 GMT</pubDate></item><item><title><![CDATA[Reply to Mark all text who have word searched on Mon, 09 May 2022 11:03:10 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/elbriak-badr" aria-label="Profile: elbriak-badr">@<bdi>elbriak-badr</bdi></a> , <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Ah…, OK. In this case, we must use the <strong><code>(?s)</code></strong> modifier for the <strong>entire</strong> regex.and the goal becomes :</p>
<ul>
<li>
<p dir="auto"><strong>A)</strong> To look for <strong>any</strong> range of text, between the string <strong><code>#TEST</code></strong>, <strong>beginnning</strong> a line, till the <strong>nearest</strong> <strong><code>|</code></strong> character</p>
</li>
<li>
<p dir="auto"><strong>B)</strong> This <strong>range</strong> must, of course, contains the word <strong><code>special</code></strong></p>
</li>
<li>
<p dir="auto"><strong>C)</strong> The string <strong><code>#TEST</code></strong>, itself, must <strong>never</strong> occur, after <strong>each</strong> <strong><code>#TEST</code></strong> string till the word <strong><code>special</code></strong> !</p>
</li>
</ul>
<hr />
<p dir="auto">Thus, the appropriate regex is :</p>
<p dir="auto">SEARCH <strong><code>(?s-i)^#TEST((?!#TEST).)+?special.+?\|</code></strong></p>
<hr />
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">To achieve the <strong>C)</strong> condition, we use a <strong>negative look-ahead</strong> condition, meaning that the range of chars, <strong>after</strong> <strong><code>#TEST</code></strong>, <strong>till</strong> the word <strong><code>special</code></strong>, must <strong>not</strong> contain the <strong><code>#TEST</code></strong> string, itself, at <strong>any</strong> position, thanks to this <strong>specific</strong> syntax <strong><code>((?!#TEST).)+?</code></strong></p>
</li>
<li>
<p dir="auto">The <strong><code>-i</code></strong> syntax, at <strong>beginning</strong> of the regex, means that the search is <strong>sensitive</strong> to case ( so <strong>not</strong> insensitive ! ) If you need a search, <strong>whatever</strong> the case, change the part <strong><code>(?s-i)</code></strong> by <strong><code>(?si)</code></strong></p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76695</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76695</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 09 May 2022 11:03:10 GMT</pubDate></item><item><title><![CDATA[Reply to Mark all text who have word searched on Mon, 09 May 2022 08:19:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> Thanks a lot , it’s working for any range of text beginning with a <code>#</code> character, having the word <code>special</code> in the next line , but can you please help me to search for range of text having the word <code>special</code> in any line ?</p>
<pre><code>#TEST Random TEXT |

#TEST Random TEXT:
Random TEXT special Random TEXT |

#TEST Random TEXT:
Random TEXT  |

#TEST Random TEXT:
Random TEXT 
Random TEXT 
Random TEXT special Random TEXT
Random TEXT  |

#TEST Random TEXT:
Random TEXT 
Random TEXT special Random TEXT
Random TEXT 
Random TEXT  |
</code></pre>
<p dir="auto">Results</p>
<pre><code>#TEST Random TEXT:
Random TEXT special Random TEXT |

#TEST Random TEXT:
Random TEXT 
Random TEXT 
Random TEXT special Random TEXT
Random TEXT  |

#TEST Random TEXT:
Random TEXT 
Random TEXT special Random TEXT
Random TEXT 
Random TEXT  |
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/76694</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76694</guid><dc:creator><![CDATA[ElBriak Badr]]></dc:creator><pubDate>Mon, 09 May 2022 08:19:34 GMT</pubDate></item><item><title><![CDATA[Reply to Mark all text who have word searched on Sun, 08 May 2022 21:38:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/elbriak-badr" aria-label="Profile: elbriak-badr">@<bdi>elbriak-badr</bdi></a> , <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">So you need to <strong>mark</strong> any range of text <strong>beginning</strong> with a <strong><code>#</code></strong> character, having the word <strong><code>special</code></strong> in the <strong>next</strong> line and then mark <strong>all</strong> chars till the <strong>nearest</strong> <strong><code>|</code></strong> character</p>
<p dir="auto">In this case, the road map is :</p>
<ul>
<li>
<p dir="auto">Open the <strong>Mark</strong> dialog ( <strong><code>Ctrl + M</code></strong> )</p>
</li>
<li>
<p dir="auto">Find what : <strong><code>(?-is)^#TEST.+\R.+special(?s).+?\|</code></strong></p>
</li>
<li>
<p dir="auto"><strong>Un-tick</strong> all options</p>
</li>
<li>
<p dir="auto">Tick the <strong><code>Bookmark line</code></strong>, <strong><code>Purge for each search</code></strong> and <strong><code>Wrap around</code></strong> options</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search <strong>mode</strong></p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Mark All</code></strong> button</p>
</li>
<li>
<p dir="auto">Now, you can, either :</p>
<ul>
<li>
<p dir="auto">Click on the <strong><code>Copy Marked text</code></strong> button and <strong>paste</strong> the clipboard contents in a <strong>new</strong> tab</p>
</li>
<li>
<p dir="auto">Choose the <strong>menu</strong> option <strong><code>Search &gt; Bookmark &gt; Copy Bookmarked lines</code></strong> and <strong>paste</strong> the clipboard contents in a <strong>new</strong> tab</p>
</li>
</ul>
</li>
</ul>
<hr />
<p dir="auto"><strong>Notes</strong>,</p>
<ul>
<li>
<p dir="auto">The search is sensitive to <strong>case</strong>, due to the <strong>in-line</strong> modifier <strong><code>-i</code></strong> ( so, <strong>not</strong> insensitive ! )</p>
</li>
<li>
<p dir="auto">At beginning any <strong><code>.</code></strong> matches a <strong>single standard</strong> char ( so, <strong>not</strong> the line-endings )</p>
</li>
<li>
<p dir="auto">After the word <strong><code>special</code></strong>, the <strong>in-line</strong> modifier <strong><code>(?s)</code></strong> means that <strong>dot</strong> matches <strong>any</strong> character, including <strong>EOL</strong> ones</p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76690</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76690</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 08 May 2022 21:38:19 GMT</pubDate></item><item><title><![CDATA[Reply to Mark all text who have word searched on Sun, 08 May 2022 12:25:23 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> Thanks For your Reply ,<br />
The text like you see is started by <code>#</code> and ended by <code>|</code></p>
<p dir="auto">I need to mark all text who have the word <code>special</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/76684</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76684</guid><dc:creator><![CDATA[ElBriak Badr]]></dc:creator><pubDate>Sun, 08 May 2022 12:25:23 GMT</pubDate></item><item><title><![CDATA[Reply to Mark all text who have word searched on Sun, 08 May 2022 12:15:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/elbriak-badr" aria-label="Profile: elbriak-badr">@<bdi>elbriak-badr</bdi></a></p>
<p dir="auto">I think a clarification for those that want to help is:</p>
<p dir="auto">You want to mark multiple lines of text that occur between single empty lines, that contain the text <code>special</code>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/76682</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/76682</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 08 May 2022 12:15:18 GMT</pubDate></item></channel></rss>