Good evening.
Have such problem with regex new-line character ("\n") in Google app script. I'm using .getbody() method for mail parse and get some of this
<td valign="middle" width="43" align="left">
<img src="http://img/mail-new-oct/icon2.png" style="display: block; vertical-align: middle;" alt="Logo">
</td>
<td align="center" valign="top" style="font-family: 'Open Sans', Helvetica, 'Helvetica Neue', Arial, sans-serif; font-size: 13px; line-height: 30px; color: #000000; font-weight: 400; text-align: left;">0972398182
</td>
For this part, i need phone number 0972398182. I try get it with this expression:
icon2.*\n.*\n.*>\s*([\s\S]+?)\s*(?=<\/td>)
icon2 - is one unique identification for this html body, so i need to use them.
Go through without ("\n") impossible in this way, and finally it doesnt work. I read, that GAS doesnt work with ("\n") , but maybe have other way how to solve this?
Will be grateful for any help, thanks!