Text Processing how to code in html tags ?

papa-rico

Client
Регистрация
15.11.2020
Сообщения
151
Благодарностей
8
Баллы
18
Hello so i have fetched Html text and need to get only one code from between tags :

code :
HTML:
[{"subject":"cli command for your bash cli","sender_name":"","sender_email":"[email protected]","date":"02 Dec 2021 04:35 AM","datediff":"14 minutes ago","id":1863,"content":"<div dir=\"ltr\">sudo \/usr\/local\/vesta\/bin\/v-add-user demo s3cp4ssw0rd <a target=\"blank\" href=\"mailto:[email protected]\">[email protected]<\/a><br><\/div>\r\n","attachments":[]}]


what i need from this text only : sudo

how can i process this and put it in variable ?
 

papa-rico

Client
Регистрация
15.11.2020
Сообщения
151
Благодарностей
8
Баллы
18
this is the text


HTML:
[{"subject":"\u041f\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u044c\u0442\u0435 \u0441\u0432\u0456\u0439 youtube account","sender_name":"youtube account","sender_email":"[email protected]","date":"02 Dec 2021 03:27 AM","datediff":"1 hour ago","id":1865,"content":"<!doctype html>\r\n<html>\r\n<head>\r\n  <meta charset=\"utf-8\">\r\n  <title>\u041f\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u044c\u0442\u0435 \u0441\u0432\u0456\u0439 youtube account<\/title>\r\n<\/head>\r\n\r\n<body style=\"margin: 0; padding: 0;\">\r\n<div dir=\"ltr\" lang=\"uk\" style=\"max-width: 100&#37;; width:600px; margin: 0 auto; box-sizing: border-box; font-family: Arial, Helvetica, &#39;sans-serif&#39;; font-weight: normal; font-size:16px; line-height: 22px; color: #252525; word-wrap: break-word; word-break: break-word;text-align: left;\">\r\n\r\n\r\n  <div title=\"logo\" style=\"padding: 25px 24px 24px 24px; box-sizing: border-box;\"><img src=\"https:\/\/account.youtube.com\/accounts\/v1\/resources\/one-ui\/images\/layout\/txt_logo.png\" alt=\"youtube Account\" style=\"height: 11px;\" border=\"0\"><\/div>\r\n  <div title=\"email\" style=\"padding: 24px 40px 24px 40px; margin: 0;\">\r\n    <div title=\"title\" style=\"font-size: 24px; line-height: 1.17; color: #252525; margin:0 0 40px 0; padding: 0;\">\u041f\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u044c\u0442\u0435 \u0441\u0432\u0456\u0439 youtube account<\/div>\r\n    <div title=\"content\" style=\"font-size: 16px; line-height: 22px; color: #252525;\">\r\n      <!&ndash;&ndash; Dear Customer, &ndash;&ndash;> \u0428\u0430\u043d\u043e\u0432\u043d\u0438\u0439 \u043a\u043b\u0456\u0454\u043d\u0442\u0435!<br>\r\n      <br>\r\n      <!&ndash;&ndash; You have registered [email protected] as your youtube Account ID. &ndash;&ndash;> [email protected] \u0437\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u043e\u0432\u0430\u043d\u043e \u044f\u043a \u043d\u043e\u0432\u0438\u0439 \u0456\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440 \u043e\u0431\u043b\u0456\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0441\u0443 youtube.<br>\r\n      <!&ndash;&ndash; To verify your email address, enter the 6-digit PIN below when prompted. &ndash;&ndash;> \u0429\u043e\u0431 \u043f\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438, \u0443\u0432\u0435\u0434\u0456\u0442\u044c \u043a\u043e\u0434 \u043f\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u0436\u0435\u043d\u043d\u044f \u043d\u0438\u0436\u0447\u0435.<br>\r\n      <p style=\"margin: 40px 0 8px 0; padding: 0; text-align: center; color: #8f8f8f; font-size: 14px;\"><!&ndash;&ndash; Your PIN :&ndash;&ndash;> PIN-\u043a\u043e\u0434<\/p>\r\n      <p id=\"pin\" style=\"margin: 0 0 40px 0; padding: 0; text-align: center; color: #252525; font-size: 30px; letter-spacing: 0.83; font-family: Arial, Helvetica, &#39;sans-serif&#39;; font-weight: normal;  word-wrap: break-word; word-break: break-word;\">336825<\/p>      \r\n      <p style=\"margin: 0 0 40px 0; padding: 0; font-size: 16px; color: #252525; font-family: Arial, Helvetica, &#39;sans-serif&#39;; font-weight: normal;  word-wrap: break-word; word-break: break-word;\"><!&ndash;&ndash;Your youtube Account team&ndash;&ndash;> \u041a\u043e\u043c\u0430\u043d\u0434\u0430 youtube account<\/p>\r\n      <p style=\"margin: 0 0 24px 0; padding: 0; color: #252525; font-family: Arial, Helvetica, &#39;sans-serif&#39;; font-weight: normal;  word-wrap: break-word; word-break: break-word; font-size: 12px; line-height: 16px; color: #909090;\">\r\n        <!&ndash;&ndash;Note : Do not reply to this email. Contact us with any queries by visiting our website at:&ndash;&ndash;> \u041f\u0440\u0438\u043c\u0456\u0442\u043a\u0430. \u041d\u0435 \u0432\u0456\u0434\u043f\u043e\u0432\u0456\u0434\u0430\u0439\u0442\u0435 \u043d\u0430 \u0446\u0435\u0439 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0438\u0439 \u043b\u0438\u0441\u0442. \u042f\u043a\u0449\u043e \u0443 \u0432\u0430\u0441 \u0432\u0438\u043d\u0438\u043a\u043b\u0438 \u0437\u0430\u043f\u0438\u0442\u0430\u043d\u043d\u044f, \u0437\u0432\u2019\u044f\u0436\u0456\u0442\u044c\u0441\u044f \u0437 \u043d\u0430\u043c\u0438, \u043f\u0435\u0440\u0435\u0439\u0448\u043e\u0432\u0448\u0438 \u043d\u0430 \u043d\u0430\u0448 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u0437\u0430 \u0442\u0430\u043a\u0438\u043c \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f\u043c:<br>\r\n        <a target=\"blank\" href=\"https:\/\/help.content.youtube.com\/csweb\/faq\/searchFaq.do\" target=\"_blank\" style=\"color: #0072de; text-decoration: underline; font-size: 12px; font-family: Arial, Helvetica, &#39;sans-serif&#39;; font-weight: normal;  word-wrap: break-word; word-break: break-word;\"><!&ndash;&ndash;Go to youtube Account customer center&ndash;&ndash;> \u041f\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044c \u0434\u043e \u0446\u0435\u043d\u0442\u0440\u0443 \u043e\u0431\u0441\u043b\u0443\u0433\u043e\u0432\u0443\u0432\u0430\u043d\u043d\u044f \u043a\u043b\u0456\u0454\u043d\u0442\u0456\u0432 youtube account<\/a>\r\n      <\/p>\r\n      <div title=\"footer\" style=\"margin: 0; padding: 40px 0 0 0; box-sizing: border-box;\">\r\n        <div title=\"footer-logo\" style=\"margin: 0 0 2px 0; padding: 0;\"><img src=\"https:\/\/account.youtube.com\/accounts\/v1\/resources\/one-ui\/images\/layout\/txt_foo_logo.png\" alt=\"youtube Account\" border=\"0\" style=\"height: 12px;\"><\/div>\r\n        <div title=\"copyright\" style=\"margin: 0; padding: 0; font-size:10px; opacity:0.6; font-weight: 300; line-height: 12px; color: #252525; font-family: Arial, Helvetica, &#39;sans-serif&#39;; font-weight: normal;  word-wrap: break-word; word-break: break-word;\">\r\n          Copyright \u00a9 1995-2021 youtube. All Rights Reserved.\r\n        <\/div>\r\n      <\/div>\r\n    <\/div>\r\n  <\/div>\r\n<\/div>\r\n\r\n\r\n<\/body>\r\n<\/html>\r\n","attachments":[]}]

I need to get only this "336825 "
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 414
Благодарностей
5 900
Баллы
113
You should use Text processing>regex and regex tester from Tools.
 

papa-rico

Client
Регистрация
15.11.2020
Сообщения
151
Благодарностей
8
Баллы
18
You should use Text processing>regex and regex tester from Tools.
Where can i find regex tester from Tools. ?


I'm trying to get what between the tag like in the Email Processing Receive email just on already fetched message


HTML:
(?<=<p\ id="pin"\ style="margin:\ 0\ 0\ 40px\ 0;\ padding:\ 0;\ text-align:\ center;\ color:\ \#252525;\ font-size:\ 30px;\ letter-spacing:\ 0\.83;\ font-family:\ Arial,\ Helvetica,\ &\#39;sans-serif&\#39;;\ font-weight:\ normal;\ \ word-wrap:\ break-word;\ word-break:\ break-word;">).*(?=</p>)
 

Вложения

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 414
Благодарностей
5 900
Баллы
113
Where can i find regex tester from Tools. ?


I'm trying to get what between the tag like in the Email Processing Receive email just on already fetched message


HTML:
(?<=<p\ id="pin"\ style="margin:\ 0\ 0\ 40px\ 0;\ padding:\ 0;\ text-align:\ center;\ color:\ \#252525;\ font-size:\ 30px;\ letter-spacing:\ 0\.83;\ font-family:\ Arial,\ Helvetica,\ &\#39;sans-serif&\#39;;\ font-weight:\ normal;\ \ word-wrap:\ break-word;\ word-break:\ break-word;">).*(?=</p>)
Man....)
86178
 

papa-rico

Client
Регистрация
15.11.2020
Сообщения
151
Благодарностей
8
Баллы
18
thanks man )) i'm a rookie :dy:
 

Кто просматривает тему: (Всего: 2, Пользователи: 0, Гости: 2)