<?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[Search and replace "" with " in random hyperlinks in a csv file]]></title><description><![CDATA[<p dir="auto">I have lots of random URLs in a CSV file which I have in a CSV file which has been exported from a MS SQL server. I am trying to import the CSV file in WordPress but some html code is not working in CSV file. Here it is an example.<br />
&lt;a href=““<a href="https://www.facebook.com/xyz/dmz" rel="nofollow ugc">https://www.facebook.com/xyz/dmz</a>””&gt;linkAA &lt;/a&gt;<br />
If I change this html code to<br />
&lt;a href=“<a href="https://www.facebook.com/xyz/dmz" rel="nofollow ugc">https://www.facebook.com/xyz/dmz</a>”&gt;linkAA &lt;/a&gt;<br />
After replacing “” with " the code works fine. I can find replace the first “” with simple find and replace but unable to find a solution to replace the second “” at the end of the URL.</p>
<p dir="auto">Can somebody help. All URLs are random and are from different websites not just facebook.</p>
<p dir="auto">Any help will be much appreciated.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22341/search-and-replace-with-in-random-hyperlinks-in-a-csv-file</link><generator>RSS for Node</generator><lastBuildDate>Sat, 12 Sep 2026 02:39:07 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22341.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Jan 2022 14:04:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Search and replace "" with " in random hyperlinks in a csv file on Wed, 05 Jan 2022 15:56:38 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> Thank you for your help. My problem has solved. I am grateful.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/72686</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/72686</guid><dc:creator><![CDATA[Waqas Saeed]]></dc:creator><pubDate>Wed, 05 Jan 2022 15:56:38 GMT</pubDate></item><item><title><![CDATA[Reply to Search and replace "" with " in random hyperlinks in a csv file on Wed, 05 Jan 2022 15:38:53 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> said in <a href="/post/72675">Search and replace "" with " in random hyperlinks in a csv file</a>:</p>
<blockquote>
<p dir="auto">No you don’t.  You have “” in many places in the file.  Search/replace requires precision in your thinking and phrasing and typing.</p>
</blockquote>
<p dir="auto">I’ve given up trying to get people to understand that posting here on the forum will muck with certain data unless they “black box” it:</p>
<pre><code>This won't mess with my data -- well, too much anyway
</code></pre>
<p dir="auto">or red-text it:</p>
<p dir="auto"><code>This won't mess with my data -- well, too much anyway</code></p>
<p dir="auto">Details on doing the above formatting are probably found <a href="https://community.notepad-plus-plus.org/topic/22022/faq-desk-template-for-search-replace-questions">HERE</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/72683</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/72683</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 05 Jan 2022 15:38:53 GMT</pubDate></item><item><title><![CDATA[Reply to Search and replace "" with " in random hyperlinks in a csv file on Wed, 05 Jan 2022 15:20:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/waqas-saeed" aria-label="Profile: waqas-saeed">@<bdi>waqas-saeed</bdi></a> ,</p>
<blockquote>
<p dir="auto">I have “”</p>
</blockquote>
<p dir="auto">No you don’t.  You have <code>""</code> in many places in the file.  Search/replace requires precision in your thinking and phrasing and typing.</p>
<p dir="auto">If you are going to type quotes in the forum, if you want there to be no confusion, then you <em>must</em> read the “Read Before Posting” and the other FAQs it links, because otherwise the forum will convert your <code>""</code> to “”, which are <em>not</em> the same pairs of characters.</p>
<blockquote>
<p dir="auto">I have <code>""</code> everywhere in the CSV file</p>
</blockquote>
<p dir="auto">So then <code>href=""</code> becomes <code>href="</code> and <code>""&gt;</code> becomes <code>&gt;"</code> (the latter of which Alan already said)</p>
<p dir="auto">or, with search-mode in regular expression, <code>href=""([^"]+?)""</code> becomes <code>href="$1"</code></p>
<p dir="auto">If you don’t have any other HTML attributes (like classes, styles, and the like), then Alan’s most-recent regular expression will work.  But if your code is really <code>&lt;a class="foobar" href=""https://some.url/here"" style="color: red"&gt;</code> then his regex won’t work, so you’ll want to try mine.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/72675</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/72675</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 05 Jan 2022 15:20:44 GMT</pubDate></item><item><title><![CDATA[Reply to Search and replace "" with " in random hyperlinks in a csv file on Wed, 05 Jan 2022 15:17:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/waqas-saeed" aria-label="Profile: waqas-saeed">@<bdi>waqas-saeed</bdi></a> said in <a href="/post/72669">Search and replace "" with " in random hyperlinks in a csv file</a>:</p>
<blockquote>
<p dir="auto">basically problem is I have “” everywhere in the CSV file so I cannot just find and replace “” in one go</p>
</blockquote>
<p dir="auto">Ah, then maybe this works, and is simplest to understand:</p>
<p dir="auto">find: <code>(?-is)&lt;a href=""(.+?)""&gt;</code><br />
repl: <code>&lt;a href="${1}"&gt;</code><br />
mode: regular expression</p>
<p dir="auto">Note, assumes links are all on one line.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/72673</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/72673</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 05 Jan 2022 15:17:01 GMT</pubDate></item><item><title><![CDATA[Reply to Search and replace "" with " in random hyperlinks in a csv file on Wed, 05 Jan 2022 15:09:20 GMT]]></title><description><![CDATA[<p dir="auto">basically problem is I have “” everywhere in the CSV file so I cannot just find and replace “” in one go. I just need to replace “” at just these two spots where ever there is a &lt;a href=“" tag used in the CSV file.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/72669</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/72669</guid><dc:creator><![CDATA[Waqas Saeed]]></dc:creator><pubDate>Wed, 05 Jan 2022 15:09:20 GMT</pubDate></item><item><title><![CDATA[Reply to Search and replace "" with " in random hyperlinks in a csv file on Wed, 05 Jan 2022 14:15:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/waqas-saeed" aria-label="Profile: waqas-saeed">@<bdi>waqas-saeed</bdi></a> ,</p>
<p dir="auto">If I view-source, I think your example data is using two ASCII double-quotes in a row, <code>""</code>, not the smart quotes that the forum shows, “” – following the advice linked in the “Please Read This Before Posting” would have helped you show your data without ambiguity.</p>
<p dir="auto">That said, FIND=<code>""</code>, REPLACE=<code>"</code>, and then FIND-NEXT/REPLACE or a global REPLACE ALL, will work in normal search mode – unless you have other places where you want to keep <code>""</code>, in which case it wouldn’t work… but do you really ever want to keep <code>""</code> in your text</p>
<p dir="auto">There are no commas (or other separator-character characters) shown in your data, so I’m unsure why you mentioned “csv”</p>
<p dir="auto">Ah, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a>’s less long-winded reply beat me to it. :-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/72662</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/72662</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 05 Jan 2022 14:15:13 GMT</pubDate></item><item><title><![CDATA[Reply to Search and replace "" with " in random hyperlinks in a csv file on Wed, 05 Jan 2022 14:14:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/waqas-saeed" aria-label="Profile: waqas-saeed">@<bdi>waqas-saeed</bdi></a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/waqas-saeed" aria-label="Profile: waqas-saeed">@<bdi>waqas-saeed</bdi></a> said in <a href="/post/72659">Search and replace "" with " in random hyperlinks in a csv file</a>:</p>
<blockquote>
<p dir="auto">fter replacing “” with " the code works fine. I can find replace the first “” with simple find and replace but unable to find a solution to replace the second “” at the end of the URL.</p>
</blockquote>
<p dir="auto">Any reason you can’t simply replace <code>""</code> with <code>"</code>?<br />
Or <code>""&gt;</code> with <code>"&gt;</code>?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/72661</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/72661</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 05 Jan 2022 14:14:11 GMT</pubDate></item></channel></rss>