[email imap automation] create a Regex to extract the href of the <a> wanted

Arthuro

Новичок
Регистрация
24.07.2019
Сообщения
18
Благодарностей
3
Баллы
3
Hello,

I found the email and now, I want to create a regex to catch the activation link.

It's myhtml :
HTML:
<a href="https://lin.com/activation/NX1B4s3xh1ip" target="_blank" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; cursor: pointer; word-wrap: break-word; word-break: break-word; color: #FFFFFF; text-decoration: none;">Specific word</a>
How can I do to exract the href in Zennoposter.

I have this regex :
HTML:
.*href=\"(.*?)\".*>Specific word.*
it's match but zennoposter doesn't find/give me the way to select the capture group.

I made an online tester

The result in project maker :



could you help me please ?
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
Did you try our regex tester to create regular expression?
Image 11.png
 

Arthuro

Новичок
Регистрация
24.07.2019
Сообщения
18
Благодарностей
3
Баллы
3
thank you VladZen,

No, I didn't see before this tool. It pretty similar of the toold ine the email right ? But, I tried it, the tester found one "groups", like you see on the picture, so the regex works :


But why the same regex on email processing, doesn't work ? The email processing doesn't show "groups" only "matches" :


Thank you
 

morpheus93

Client
Регистрация
25.01.2012
Сообщения
1 058
Благодарностей
244
Баллы
63
I would also like to know for what the "Groups" tab in the regex tester is. What are "groups"?
 

Arthuro

Новичок
Регистрация
24.07.2019
Сообщения
18
Благодарностей
3
Баллы
3
I would also like to know for what the "Groups" tab in the regex tester is. What are "groups"?
In my regex I specified which data I want to extract, here it's the href content.
So the groups contains all extract data wanted, it can be more.

Look you can see in this pictures, in "groups" tabs : line 0, Number 1, I have my link who is my activation link :

 
  • Спасибо
Реакции: morpheus93

morpheus93

Client
Регистрация
25.01.2012
Сообщения
1 058
Благодарностей
244
Баллы
63
Okay thank you. I think I got it :-)
 

Arthuro

Новичок
Регистрация
24.07.2019
Сообщения
18
Благодарностей
3
Баллы
3

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

Arthuro

Новичок
Регистрация
24.07.2019
Сообщения
18
Благодарностей
3
Баллы
3
I don't see your images and can't answer you.
Please attach screenshots properly.
Here the regex you probably need:
(?<=<a\ href=")http.*?(?="\ target=)
I'm sorry, I didn't know, nobody saw my screenshot.
Thank you for your regex, it's perfect, not it's work. I didn't know the tips : (? ...) to not select.
 

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