B
B
BlackR2022-04-02 13:56:16
Parsing
BlackR, 2022-04-02 13:56:16

How to parse all phone numbers in Notepad++?

Text from various pieces of html docks, of the form

</crux-user-component>  </lyte-exptable-td>    <lyte-exptable-td style="" class="sort lv_data_email cellWrap ">  <a class="cxEmailViewLink cruxPreventClick" href="mailto:[email protected]"> <lyte-text lt-prop-tooltip-config="{&quot;showdelay&quot;:600,&quot;appearance&quot;:&quot;box&quot;}" lt-prop-tooltip-class="lvTooltipClass" lt-prop-value="[email protected]" lt-prop-title="" mouseenter="lyte-text =&gt; mouse" lyte-rendered="">  [email protected]  </lyte-text></a>  </lyte-exptable-td>    <lyte-exptable-td style="" class="sort lv_data_phone cellWrap ">  <lyte-text class="newDTField" lt-prop-tooltip-config="{&quot;showdelay&quot;:600,&quot;appearance&quot;:&quot;box&quot;}" lt-prop-tooltip-class="lvTooltipClass" lt-prop-value="Sep 23, 2020 02:35 PM" lt-prop-title="" mouseenter="lyte-text =&gt; mouse" lyte-rendered="">  Sep 23, 2020 02:35 PM  </lyte-text>  </lyte-exptable-td>    <lyte-exptable-td style="" class="sort lv_data_textfield cellWrap ">    </lyte-exptable-td>    <lyte-exptable-td style="" class="sort lv_data_textfield cellWrap ">    </lyte-exptable-td>    <lyte-exptable-td style="" class="sort lv_data_textfield cellWrap ">    </lyte-exptable-td>    <lyte-exptable-td style="" class="sort cursorDefault cellWrap nlv_data_textarea ">    </lyte-exptable-td>    <lyte-exptable-td style="" class="sort lv_data_textfield cellWrap ">    </lyte-exptable-td>    <lyte-exptable-td style="" class="sort lv_data_phone cellWrap ">  <div class="phoneRtl cxPhoneViewZPBEnabled cruxPreventClick">+7 (999) 999-99-99<span class="cxPhoneViewZPBEnabledIconWrap"><zpb-phone number="+7 (999) 999-99-99" module="Contacts" recordid="301658000000242673" callbackparamfn="asyncFn(crmCallsNew.getClick2CallPromise,&#39;301658000000242673&#39;,&#39;Contacts&#39;,&#39;Екатерина &#39;)" lyte-rendered=""><a class="pH2" title="Call" click="zpb-phone =&gt; telcall(event,number)"></a>	</zpb-phone></span></div>  </lyte-exptable-td>    <lyte-exptable-td style="" class="sort lv_data_textfield cellWrap "


you need to leave the species number, of course, don't care about repetitions, this is the least of the problems ...

+7 (999) 999-99-99
+7 (999)

999-99-99 about 200k lines were entered by users on their own

, and about 15000 numbers, the file will have to be split anyway, as I understand it, I

saw solutions like
Find: (?s).*?(?-sm:$|PHONE\s+(.+))
Replace: $1\n

but I have a zero reaction to the document, nothing has changed at all, I also tried other options, the best one was with emails, but I didn’t understand how to convert it to phones, and I found only 8 pieces, but there were them in the test piece at least 30

ps ready to listen to all other solutions on how to parse outside of Notepad++ , tk. Initially I wanted to get something like
Name email phone
but at least pull out the phones)))

my base if anything, just when I stopped working in CRM I downloaded it as best I could

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2022-04-02
@BlackR

<zpb-phone number="+7 (999) 999-99-99" module="Contacts"

Find: (?s).*?(?:\z|<zpb-phone number="([^"]+))
Replace:$1\n

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question