<?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[Replace everything before certain key]]></title><description><![CDATA[<p dir="auto">Hi there,<br />
is there any symbol or command that will get everything before a certain key value in Find functionality?</p>
<p dir="auto">For example: Anything before “id” I want to get deleted.</p>
<pre><code>    Line 90:     "id": 1111111
    Line 99:     "id": 2222222
</code></pre>
<p dir="auto">And I want to get this<br />
“id”: 1111111<br />
“id”: 2222222</p>
<p dir="auto">Thank you</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/16435/replace-everything-before-certain-key</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 23:48:09 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/16435.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Oct 2018 12:36:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Replace everything before certain key on Mon, 08 Oct 2018 14:36:16 GMT]]></title><description><![CDATA[<p dir="auto">I knew there was some command users use but couldn’t find what kind of. I did some replacing by myself but hit the wall everytime i had to replace Line xxxx and couldn’t think of how to reference before the “id”. Anyway thank you very much for helping me and tips for my next post.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/35325</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/35325</guid><dc:creator><![CDATA[Trung Michal Nguyen]]></dc:creator><pubDate>Mon, 08 Oct 2018 14:36:16 GMT</pubDate></item><item><title><![CDATA[Reply to Replace everything before certain key on Mon, 08 Oct 2018 13:08:01 GMT]]></title><description><![CDATA[<ul>
<li><strong>Find What</strong>: <code>(?-s)^.*(?="id")</code></li>
<li><strong>Replace With:</strong> (empty)</li>
<li><strong>Search Mode</strong>: Regular Expression</li>
</ul>
<p dir="auto">This will search from the beginning of the line, until it finds <code>"id"</code> (in normal double-quotes), and replace it with nothing (ie, delete it).  The <code>(?-s)</code> makes sure that the match-anything <code>.*</code> character won’t match newlines, so each match is limited to a single line.  (This could also be accomplished by unchecking <code>. matches newline</code> in the dialog box… but by putting it into the regex, the expression will work even if someone didn’t notice the checkbox.)</p>
<p dir="auto">-–<br />
FYI: if you have further regex needs, study <a href="https://notepad-plus-plus.org/community/topic/15765/faq-desk-where-to-find-regex-documentation" rel="nofollow ugc">this FAQ</a> and the documentation it points to. Before asking a new regex question, understand that many of us will expect you to show what data you have (exactly), what data you want (exactly), what regex you already tried (to show that you’re showing effort), why you thought that regex would work (to prove it wasn’t just something randomly typed), and what data you’re getting with an explanation of why that result is wrong. When you show that effort, you’ll see us bend over backword to get things working for you.  If you need help formatting the data so that the forum doesn’t mangle it (so that it shows “exactly”, as I said earlier), see <a href="https://notepad-plus-plus.org/community/topic/14262/how-to-markdown-code-on-this-forum/2" rel="nofollow ugc">this help-with-markdown post</a>, where <a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a> gives a great summary of how to use Markdown for this forum’s needs.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/35324</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/35324</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 08 Oct 2018 13:08:01 GMT</pubDate></item></channel></rss>