<?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[CSS not working when I add it to multiple files using the Regular expression mode]]></title><description><![CDATA[<p dir="auto">My CSS is not working when I add it to multiple files using the Regular expression mode.<br />
I added this:-</p>
<pre><code>&lt;style&gt;
.container {
    display: flex;
}
.container &gt; div {}
}
@media (max-width: 480px) {
.left {
  width: 150px;
  border-width:1px;
  border-style:solid;
  border-color:lightblue;
  padding-top:10px;
}
.right {
  width: 140px;
  border-top:1px solid lightblue;
}
}
&lt;/style&gt;
</code></pre>
<p dir="auto">However, I observe that if I add it to multiple files using the Regular expression mode, it doesn’t work - I have to copy and paste it manually for it to work.</p>
<p dir="auto">Is this a bug or is there a way to do it correctly?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26365/css-not-working-when-i-add-it-to-multiple-files-using-the-regular-expression-mode</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 23:44:38 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26365.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 14 Nov 2024 07:53:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Sun, 15 Dec 2024 20:18:33 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">See also the <strong>last</strong> part of this post which exposed a <strong>simple</strong> solution when you just want to insert a <strong>multi-lines</strong> text, even in <strong>multiple</strong> locations, of the <strong>curent</strong> file, <strong>only</strong> :</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/98543">https://community.notepad-plus-plus.org/post/98543</a></p>
<p dir="auto">Best Regards</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98544</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98544</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 15 Dec 2024 20:18:33 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Fri, 15 Nov 2024 12:22:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> said:</p>
<blockquote>
<p dir="auto">for multiple lines to be added, we have to put Line1\r\nLine2\r\nLine3\r\nLine4</p>
</blockquote>
<p dir="auto">OK, so now any possible benefit of the original technique is probably lost to future readers.  :-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97913</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97913</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 15 Nov 2024 12:22:43 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Fri, 15 Nov 2024 12:21:28 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/97907">CSS not working when I add it to multiple files using the Regular expression mode</a>:</p>
<blockquote>
<p dir="auto">Perhaps equally important for possible future readers of this topic is showing a technique to get multiline text into the <em>Replace with</em> box!  :-)</p>
</blockquote>
<p dir="auto">Yes, for multiple lines to be added, we have to put <code>Line1\r\nLine2\r\nLine3\r\nLine4</code> in the Replace in files field to get one line below the other.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97912</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97912</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Fri, 15 Nov 2024 12:21:28 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Fri, 15 Nov 2024 12:23:49 GMT]]></title><description><![CDATA[<p dir="auto">For those who’ve searched online and come here, let me tell you that I had already made the mistake of not escaping the parentheses, just as <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> gave as a solution first which was faulty as it skipped adding the parentheses. I had ended up with <code>@media max-width: 480px {</code>. However, you need not fret if you have made the same mistake, just put <code>@media max-width: 480px</code> in the Find field, select the Regular expression mode, put <code>@media \(max-width: 480px\)</code> and hit the Replace in files button and you will end up  with the correct result which is <code>@media (max-width: 480px) {</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/97908</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97908</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Fri, 15 Nov 2024 12:23:49 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Fri, 15 Nov 2024 12:06:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> said in <a href="/post/97906">CSS not working when I add it to multiple files using the Regular expression mode</a>:</p>
<blockquote>
<p dir="auto">The gist of the matter is that parentheses…</p>
</blockquote>
<p dir="auto">Perhaps equally important for possible future readers of this topic is showing a technique to get multiline text into the <em>Replace with</em> box!  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97907</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97907</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 15 Nov 2024 12:06:27 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Fri, 15 Nov 2024 11:54:01 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> The gist of the matter is that parentheses, that is rounded, simple brackets have to be escaped with a backslash like <code>\(</code> and <code>\) </code> or else they will be skipped during any replacement</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97906</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97906</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Fri, 15 Nov 2024 11:54:01 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Fri, 15 Nov 2024 11:50:39 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> said in <a href="/post/97904">CSS not working when I add it to multiple files using the Regular expression mode</a>:</p>
<blockquote>
<p dir="auto">No doubt that using my method will be safer !!</p>
</blockquote>
<p dir="auto">Understood.<br />
I was just trying to help OP by sticking with his exact problem.<br />
It’s fine to present more complicated situations in follow-on discussions, as you did.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97905</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97905</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 15 Nov 2024 11:50:39 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Fri, 15 Nov 2024 11:43:33 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <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"><strong>Alan</strong>, I grant you : your idea is more <strong>direct</strong> and simpler than mine ;-))</p>
<hr />
<p dir="auto">However, let’s suppose that an OP is working on a <strong><code>Lisp</code></strong> program and that he wants to insert this <strong><code>Lisp</code></strong> module which converts any <strong>roman</strong> number into its <strong>decimal</strong> equivalent number</p>
<p dir="auto">For instance, in <strong><code>Lisp</code></strong>, with the program below and the question <strong><code>(trad 'MCMXCV)</code></strong>, it would return <strong><code>1995</code></strong> ( I do <strong>not</strong> know this language and I just suppose that it’s <strong>true</strong> ! )</p>
<pre><code class="language-diff">(de trad (Z) (cond  ;                \* ROMAN number -&gt; DECIMAL number *\
					(( eq Z 'I) 1)
					(( eq Z 'V) 5)
					(( eq Z 'X) 10)
					(( eq Z 'L) 50)
					(( eq Z 'C) 100)
					(( eq Z 'D) 500)
					(( eq Z 'M) 1000)
					((atom Z) (trad (explodech Z)))
					((null (cdr Z)) (trad (car Z)))
					((&lt; (trad (car Z)) (trad (cadr Z)))
					(- (trad (cdr Z)) (trad (car Z))))
					(t (+ (trad (car Z)) (trad (cdr Z)) )) ))
</code></pre>
<p dir="auto">No doubt that using my mehtod will be <strong>safer</strong> !!</p>
<p dir="auto">Note that I included a <em>LISP</em> <strong>comment</strong>, which begins with a <strong>semi-colon</strong>, adding a comment with a <strong><code>C-like</code></strong> syntax in order to place <strong>anti-slashes</strong> in my example !</p>
<p dir="auto">After aplying the <strong>regex</strong> S/R :</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>([()\\])|\R</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>?1\\\1:\\r\\n</code></strong></p>
</li>
</ul>
<p dir="auto">against this <strong><code>List</code></strong> module, you would get the text below, which could be <strong>correctly</strong> inserted, as it, in a larger <strong><code>Lisp</code></strong> program !</p>
<pre><code class="language-diff">\(de trad \(Z\) \(cond  ;                \\* ROMAN number -&gt; DECIMAL number *\\\r\n					\(\( eq Z 'I\) 1\)\r\n					\(\( eq Z 'V\) 5\)\r\n					\(\( eq Z 'X\) 10\)\r\n					\(\( eq Z 'L\) 50\)\r\n					\(\( eq Z 'C\) 100\)\r\n					\(\( eq Z 'D\) 500\)\r\n					\(\( eq Z 'M\) 1000\)\r\n					\(\(atom Z\) \(trad \(explodech Z\)\)\)\r\n					\(\(null \(cdr Z\)\) \(trad \(car Z\)\)\)\r\n					\(\(&lt; \(trad \(car Z\)\) \(trad \(cadr Z\)\)\)\r\n					\(- \(trad \(cdr Z\)\) \(trad \(car Z\)\)\)\)\r\n					\(t \(+ \(trad \(car Z\)\) \(trad \(cdr Z\)\) \)\) \)\)\r\n
</code></pre>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
<p dir="auto">Well, this example is a bit “<strong>far-fetched</strong>”, but, as I knew that the <strong><code>Lisp</code></strong> language abuses <strong>parentheses</strong>, I couldn’t resist ! LOL</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97904</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97904</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Fri, 15 Nov 2024 11:43:33 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Fri, 15 Nov 2024 01:25:02 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></p>
<p dir="auto">It seems like your solution is a long route when the OP was looking for a short route.</p>
<p dir="auto">Much shorter is what I guessed at and seemingly what the OP was already doing:</p>
<ul>
<li>select the replacement text in the editor</li>
<li>press Ctrl+f</li>
<li>swap <em>Find what</em> and <em>Replace with</em> (using the button)</li>
<li>overwrite <em>Find what</em></li>
<li>“escape” any <code>(</code> or <code>)</code> characters in <em>Replace with</em></li>
<li>execute <em>Replace in Files</em></li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/97898</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97898</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 15 Nov 2024 01:25:02 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 14:01:24 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> merci beaucoup!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97870</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97870</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Thu, 14 Nov 2024 14:01:24 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 13:47:30 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</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">Yes, <a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a>, you’re right : we have to <strong>escape</strong> the <strong>parentheses</strong>, but also to <strong>escape</strong> the <strong><code>escape</code></strong> character, too, if it occurs as a <strong>literal</strong> !!</p>
<p dir="auto">Thus, this is an <em>UPDATED</em> version of my <strong>previous</strong> post !</p>
<p dir="auto">Ah…, of course,  you <strong>cannot</strong> do it that way because when you try to insert a <strong>multi-line</strong> text into the <strong>Replace</strong> zone of the <strong><code>Replace</code></strong>, <strong><code>Find in Files</code></strong> or <strong><code>Find in Projects</code></strong> tab, you just get the <strong>very first</strong> line of your text</p>
<p dir="auto">First, I verified, from this link <a href="https://www.w3schools.com/html/html_css.asp" rel="nofollow ugc">https://www.w3schools.com/html/html_css.asp</a>, that the internal multi-lines <strong>CSS</strong> section ( <strong><code>&lt;style&gt;...........&lt;/style&gt;</code></strong> ) is <strong>generally</strong> located, right before the <strong>HTML</strong> <strong><code>&lt;/head&gt;</code></strong> tag</p>
<p dir="auto">So, I supposed that you want to insert the <strong>CSS</strong> part, below :</p>
<pre><code class="language-css">&lt;style&gt;
.container {
    display: flex;
}
.container &gt; div {}
}
@media (max-width: 480px) {
.left {
  width: 150px;
  border-width:1px;
  border-style:solid;
  border-color:lightblue;
  padding-top:10px;
}
.right {
  width: 140px;
  border-top:1px solid lightblue;
}
}
&lt;/style&gt;
</code></pre>
<p dir="auto">Right before the <strong><code>&lt;/head&gt;</code></strong> tag of some of your <strong>HTML</strong> files, don’t you ?</p>
<hr />
<p dir="auto">If so, here is the <strong>correct</strong> way to insert a <strong>multi-lines</strong> text !</p>
<ul>
<li>
<p dir="auto">Copy all your <strong>CSS</strong> section in a <strong>new</strong> tab</p>
</li>
<li>
<p dir="auto">Verify that the <strong>last</strong> line <strong><code>&lt;/style&gt;</code></strong> is followed with a <strong>line-break</strong></p>
</li>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
<ul>
<li>
<p dir="auto"><strong>Uncheck</strong> all <strong>box</strong> options</p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>([()\\])|\R</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>?1\\\1:\\r\\n</code></strong></p>
</li>
<li>
<p dir="auto">Check the <strong><code>Wrap around</code></strong> option</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
</li>
</ul>
<p dir="auto">You should get this text :</p>
<pre><code class="language-css">&lt;style&gt;\r\n.container {\r\n    display: flex;\r\n}\r\n.container &gt; div {}\r\n}\r\n@media \(max-width: 480px\) {\r\n.left {\r\n  width: 150px;\r\n  border-width:1px;\r\n  border-style:solid;\r\n  border-color:lightblue;\r\n  padding-top:10px;\r\n}\r\n.right {\r\n  width: 140px;\r\n  border-top:1px solid lightblue;\r\n}\r\n}\r\n&lt;/style&gt;\r\n
</code></pre>
<hr />
<p dir="auto">Now, in order to <strong>test</strong> my method :</p>
<ul>
<li>Copy this tiny <strong>HTML</strong> text, below, in an <strong>other new</strong> tab</li>
</ul>
<pre><code class="language-html">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;h1&gt;This is a heading&lt;/h1&gt;
&lt;p&gt;This is a paragraph.&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<ul>
<li>
<p dir="auto">Re-open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
<ul>
<li>
<p dir="auto"><strong>Uncheck</strong> all <strong>box</strong> options</p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>(?-i)(?=&lt;/head&gt;)</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>&lt;style&gt;\r\n.container {\r\n    display: flex;\r\n}\r\n.container &gt; div {}\r\n}\r\n@media \(max-width: 480px\) {\r\n.left {\r\n  width: 150px;\r\n  border-width:1px;\r\n  border-style:solid;\r\n  border-color:lightblue;\r\n  padding-top:10px;\r\n}\r\n.right {\r\n  width: 140px;\r\n  border-top:1px solid lightblue;\r\n}\r\n}\r\n&lt;/style&gt;\r\n</code></strong></p>
</li>
<li>
<p dir="auto">Check the <strong><code>Wrap around</code></strong> option</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
</li>
</ul>
<p dir="auto">You should be left with your <strong>expected</strong> <em>OUTPUT</em> text :</p>
<pre><code class="language-html">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
.container {
    display: flex;
}
.container &gt; div {}
}
@media (max-width: 480px) {
.left {
  width: 150px;
  border-width:1px;
  border-style:solid;
  border-color:lightblue;
  padding-top:10px;
}
.right {
  width: 140px;
  border-top:1px solid lightblue;
}
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;h1&gt;This is a heading&lt;/h1&gt;
&lt;p&gt;This is a paragraph.&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p dir="auto">Voila ;-))</p>
<hr />
<p dir="auto"><em>IMPORTANT</em> : Note that the method to change any <strong>multi-lines</strong> text ( with search = <strong><code>([()\\])|\R</code></strong> and replacement = <strong><code>?1\\\1:\\r\\n</code></strong> ) is <strong>not</strong> specific to your <strong>HTML</strong> case.</p>
<p dir="auto">It will, indeed, allow you to fill in the <strong>resulting</strong> <strong><code>multi-lines</code></strong> text into the <strong><code>Replace with :</code></strong> zone, which will be inserted, <strong>identically</strong>, at the <strong>exact</strong> location defined in the <strong><code>Find what :</code></strong> zone !!</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97866</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97866</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 14 Nov 2024 13:47:30 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 13:19:43 GMT]]></title><description><![CDATA[<p dir="auto">I see that this page is showing up in the search results of the search engines like Google and msn, so for the benefit of those landing on this webpage, let me tell you that I did as <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>  typed above, then, I replaced <code>@media max-width: 480px</code> with <code>@media max-width: \(480px\)</code> with the Regular expression mode and got this result: <code>@media max-width: (480px)</code> which is what I wanted.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97865</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97865</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Thu, 14 Nov 2024 13:19:43 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 13:10:45 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> I had done exactly as you typed above and the parentheses did not get replicated where it had to be reproduced. The solution given by <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> has now helped me fix it. Thanks anyway!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97864</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97864</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Thu, 14 Nov 2024 13:10:45 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 12:46:08 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</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">I’ve just seen that I did a <strong>mistake</strong> regarding the syntax of the <strong>parentheses</strong> in the <strong><code>Replacement</code></strong> zone. Give me some minutes and I’ll post the <strong>correct</strong> solution !</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97863</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97863</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 14 Nov 2024 12:46:08 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 13:51:04 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</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"><em>PLEASE</em>, just <strong>skip</strong> this post, which is <strong>erroneous</strong>, and see my <strong>next</strong> one, below !</p>
<p dir="auto">Ah…, of course,  you <strong>cannot</strong> do it that way because when you try to insert a <strong>multi-line</strong> text into the <strong>Replace</strong> zone of the <strong><code>Replace</code></strong>, <strong><code>Find in Files</code></strong> or <strong><code>Find in Projects</code></strong> tab, you just get the <strong>very first</strong> line of your text</p>
<p dir="auto">First, I verified, from this link <a href="https://www.w3schools.com/html/html_css.asp" rel="nofollow ugc">https://www.w3schools.com/html/html_css.asp</a>, that the internal multi-lines <strong>CSS</strong> section ( <strong><code>&lt;style&gt;...........&lt;/style&gt;</code></strong> ) is <strong>generally</strong> located, right before the <strong>HTML</strong> <strong><code>&lt;/head&gt;</code></strong> tag</p>
<p dir="auto">So, I supposed that you want to insert the <strong>CSS</strong> part, below :</p>
<pre><code class="language-css">&lt;style&gt;
.container {
    display: flex;
}
.container &gt; div {}
}
@media (max-width: 480px) {
.left {
  width: 150px;
  border-width:1px;
  border-style:solid;
  border-color:lightblue;
  padding-top:10px;
}
.right {
  width: 140px;
  border-top:1px solid lightblue;
}
}
&lt;/style&gt;
</code></pre>
<p dir="auto">Right before the <strong><code>&lt;/head&gt;</code></strong> tag of some of your <strong>HTML</strong> files, don’t you ?</p>
<hr />
<p dir="auto">If so, here is the <strong>correct</strong> way to insert this <strong>multi-lines</strong> text !</p>
<ul>
<li>
<p dir="auto">Copy all your <strong>CSS</strong> section in a <strong>new</strong> tab</p>
</li>
<li>
<p dir="auto">Verify that the <strong>last</strong> line <strong><code>&lt;/style&gt;</code></strong> is followed with a <strong>line-break</strong></p>
</li>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
<ul>
<li>
<p dir="auto"><strong>Uncheck</strong> all <strong>box</strong> options</p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>\R</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>\\r\\n</code></strong></p>
</li>
<li>
<p dir="auto">Check the <strong><code>Wrap around</code></strong> option</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
</li>
</ul>
<p dir="auto">You should get this text :</p>
<pre><code class="language-css">&lt;style&gt;\r\n.container {\r\n    display: flex;\r\n}\r\n.container &gt; div {}\r\n}\r\n@media (max-width: 480px) {\r\n.left {\r\n  width: 150px;\r\n  border-width:1px;\r\n  border-style:solid;\r\n  border-color:lightblue;\r\n  padding-top:10px;\r\n}\r\n.right {\r\n  width: 140px;\r\n  border-top:1px solid lightblue;\r\n}\r\n}\r\n&lt;/style&gt;\r\n
</code></pre>
<hr />
<p dir="auto">Now, in order to <strong>test</strong> my method :</p>
<ul>
<li>Copy this tiny <strong>HTML</strong> text, below, in an <strong>other new</strong> tab</li>
</ul>
<pre><code class="language-html">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;h1&gt;This is a heading&lt;/h1&gt;
&lt;p&gt;This is a paragraph.&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<ul>
<li>
<p dir="auto">Re-open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
<ul>
<li>
<p dir="auto"><strong>Uncheck</strong> all <strong>box</strong> options</p>
</li>
<li>
<p dir="auto">SEARCH <strong><code>(?=&lt;/head&gt;)</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>&lt;style&gt;\r\n.container {\r\n    display: flex;\r\n}\r\n.container &gt; div {}\r\n}\r\n@media (max-width: 480px) {\r\n.left {\r\n  width: 150px;\r\n  border-width:1px;\r\n  border-style:solid;\r\n  border-color:lightblue;\r\n  padding-top:10px;\r\n}\r\n.right {\r\n  width: 140px;\r\n  border-top:1px solid lightblue;\r\n}\r\n}\r\n&lt;/style&gt;\r\n</code></strong></p>
</li>
<li>
<p dir="auto">Check the <strong><code>Wrap around</code></strong> option</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
</li>
</ul>
<p dir="auto">You should be left with your <strong>expected</strong> <em>OUTPUT</em> text :</p>
<pre><code class="language-html">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
.container {
    display: flex;
}
.container &gt; div {}
}
@media max-width: 480px {
.left {
  width: 150px;
  border-width:1px;
  border-style:solid;
  border-color:lightblue;
  padding-top:10px;
}
.right {
  width: 140px;
  border-top:1px solid lightblue;
}
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;h1&gt;This is a heading&lt;/h1&gt;
&lt;p&gt;This is a paragraph.&lt;/p&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p dir="auto">Voila ;-))</p>
<hr />
<p dir="auto"><em>IMPORTANT</em> : Note that the method to change any <strong>multi-lines</strong> text ( with search = <strong><code>\R</code></strong> and replacement = <strong><code>\\r\\n</code></strong> ) is <strong>not</strong> specific to your <strong>HTML</strong> case.</p>
<p dir="auto">It will, indeed, allow you to fill in the <strong>resulting</strong> <strong><code>multi-lines</code></strong> text into the <strong><code>Replace with :</code></strong> zone, which will be inserted at the <strong>exact</strong> location defined in the <strong><code>Find what :</code></strong> zone !!</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97862</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97862</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Thu, 14 Nov 2024 13:51:04 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 12:14:22 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> I believe you were able to guess what the problem is because you have been working on these RegExes for years. Thanks again!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97861</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97861</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Thu, 14 Nov 2024 12:14:22 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 12:00:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> said in <a href="/post/97859">CSS not working when I add it to multiple files using the Regular expression mode</a>:</p>
<blockquote>
<p dir="auto">the brackets were missing</p>
</blockquote>
<p dir="auto">Probably if you had called them by their correct name – parentheses – I wouldn’t have been so unsure of your problem statement.</p>
<p dir="auto">But really, providing more info up front would have been a good idea.  I had to do a lot of supposition to provide my first answer – at least it was good supposition.  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97860</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97860</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 14 Nov 2024 12:00:27 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 11:57:50 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> yes you are right - the brackets were missing and now I have added them by escaping them with a slash, that is <code>\(</code> and <code>\)</code>. Thank you very much</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97859</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97859</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Thu, 14 Nov 2024 11:57:50 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 11:49:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> said in <a href="/post/97855">CSS not working when I add it to multiple files using the Regular expression mode</a>:</p>
<blockquote>
<p dir="auto">if I add it to multiple files using the Regular expression mode</p>
</blockquote>
<p dir="auto">What does that mean?</p>
<hr />
<p dir="auto">If you are getting the multiline text you show into the <em>Replace with</em> box (presumably by selecting the text, pressing Ctrl+h, then using the “swap” button to copy from find to replace), then changing to <em>Find in Files</em> and adjusting <em>Find what</em> to be what you need, then your problem is that the replacement is dropping the <code>(</code> and <code>)</code> characters and you need to manually change them to be “escaped”: <code>\(</code> and <code>\)</code>.</p>
<p dir="auto">But you’ve given us little information besides “CSS not working…it doesn’t work”, so really at this point your problem could be many things.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97858</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97858</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 14 Nov 2024 11:49:05 GMT</pubDate></item><item><title><![CDATA[Reply to CSS not working when I add it to multiple files using the Regular expression mode on Thu, 14 Nov 2024 09:04:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dr-ramaanand" aria-label="Profile: dr-ramaanand">@<bdi>dr-ramaanand</bdi></a> Are the brackets or the <code>@</code> in the @media not being recognised when added to multiple files using the Regular Expression mode? Is there a way to solve this problem without manual copying and pasting for the CSS to work?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97856</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97856</guid><dc:creator><![CDATA[dr ramaanand]]></dc:creator><pubDate>Thu, 14 Nov 2024 09:04:34 GMT</pubDate></item></channel></rss>