<?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[Grab Mobile Phone Number from wrap data]]></title><description><![CDATA[<p dir="auto">Hi Here…<br />
I have data like as:</p>
<pre><code>healthcare
Pratik Mandiri dr.
socmed
balkisbalxxxx@gmail.com
socmed
+6208129311111
healthcare
Praktek Umum 
socmed
yulianaindixxxx@gmail.com
socmed
+6208154077777
</code></pre>
<p dir="auto">How to grab mobile phone number:<br />
Pratik Mandiri dr. | 6208129311111<br />
Praktek Umum | 6208154077777</p>
<p dir="auto">Or other result, grab mobile phone number only:<br />
6208129311111<br />
6208154077777</p>
<p dir="auto"><em>Moderator here, I’ve surrounded the example data in a code box. Please refer to the FAQ post <a href="https://community.notepad-plus-plus.org/topic/21925/faq-formatting-forum-posts">here</a> for the correct method of showing examples.</em></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26489/grab-mobile-phone-number-from-wrap-data</link><generator>RSS for Node</generator><lastBuildDate>Sat, 08 Aug 2026 21:40:48 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26489.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 22 Dec 2024 06:06:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Grab Mobile Phone Number from wrap data on Sun, 22 Dec 2024 17:08:24 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/tcast-mobile" aria-label="Profile: tcast-mobile">@<bdi>tcast-mobile</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mark-olson" aria-label="Profile: mark-olson">@<bdi>mark-olson</bdi></a> and <strong>All</strong>,</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tcast-mobile" aria-label="Profile: tcast-mobile">@<bdi>tcast-mobile</bdi></a>, just a <strong>variant</strong> which does <strong>not</strong> care about the <strong><code>socmed</code></strong> string but simply searches for the <strong>nearest</strong> <em>multi-digits</em> phone number, <strong>preceded</strong> by a <strong><code>+</code></strong> sign, <strong>beginning</strong> a line :</p>
<p dir="auto">FIND <strong><code>(?-is)healthcare\R(.+)\R(?:.+\R)+?\+(\d+\R)</code></strong></p>
<p dir="auto">REPLACE <strong><code>$1 | $2</code></strong></p>
<hr />
<p dir="auto"><strong>Notes</strong> :</p>
<p dir="auto">Most of the explanations, relative to the <strong>regex</strong> syntax, have already been given by <strong>Mark</strong>. <strong>Two</strong> other points :</p>
<ul>
<li>
<p dir="auto">The <strong><code>(?:......)</code></strong> syntax is a <strong>non-capturing</strong> group, as we do <strong>not</strong> need this information in <strong>replacement</strong></p>
</li>
<li>
<p dir="auto">The <strong><code>\+</code></strong> represents a <strong>literal</strong> <strong><code>+</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/98705</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98705</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 22 Dec 2024 17:08:24 GMT</pubDate></item><item><title><![CDATA[Reply to Grab Mobile Phone Number from wrap data on Sun, 22 Dec 2024 08:10:09 GMT]]></title><description><![CDATA[<p dir="auto">Based only on the information you provided in your initial post, if you wanted to extract</p>
<pre><code>Pratik Mandiri dr. | 6208129311111
Praktek Umum | 6208154077777
</code></pre>
<p dir="auto">you would go to the Find/Replace form (Ctrl+H with normal keybindings), check <strong>Wrap Around</strong>, set <strong>Search Mode</strong> to <code>Regular expression</code>, and:<br />
<strong>Find what:</strong> <code>(?-si)healthcare\R(.*)\Rsocmed\R.*\Rsocmed\R\+(\d+)</code><br />
<strong>Replace with:</strong> <code>${1} | ${2}</code></p>
<p dir="auto">To understand the regular expression I wrote here, you can <a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">read the Notepad++ documentation on regular expressions</a>.</p>
<p dir="auto">In brief (<em>italicized</em> words or phrases are important concepts from regular expressions):</p>
<ul>
<li><code>(?-si)</code> is a <em>flag</em> that makes it so that all ASCII letters are matched case-sensitively (the default is to ignore case) and the <code>.</code> <em>metacharacter</em> matches non-newline characters</li>
<li>The <code>\R</code> <em>escape sequence</em> matches any newline (this could be <code>\r\n</code> for Windows, <code>\r</code> for Mac, or <code>\n</code> for Linux)</li>
<li><code>.*</code> matches an entire line (including an empty line)</li>
<li>The <code>\d</code> escape sequence matches any one of the characters <code>0123456789</code></li>
<li>The <code>*</code> metacharacter indicates that the preceding pattern should be matched 0 or more times</li>
<li>The <code>+</code> metacharacter indicates that the preceding pattern should be matched 1 or more times</li>
<li>the <code>()</code> wrapping <code>(.*)</code> and <code>(\d+)</code> create two <em>capture groups</em> that are referenced in the <strong>Replace With</strong> as <code>${1}</code> and <code>${2}</code> respectively</li>
<li>The <strong>Replace With</strong> has its own special syntax and set of special sequences that is different from the syntax for the <strong>Find what</strong>. For instance, in the <strong>Replace With</strong> syntax, <code>*</code> and <code>+</code> and <code>.</code> have no special meaning; they’re just treated as normal characters.</li>
</ul>
<p dir="auto">Hopefully that’s enough information for you to tweak this regular expression as needed, in case what I gave you is not general enough to meet your needs.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/98703</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/98703</guid><dc:creator><![CDATA[Mark Olson]]></dc:creator><pubDate>Sun, 22 Dec 2024 08:10:09 GMT</pubDate></item></channel></rss>