I want to extract the item between <a></a> which contains a specific word.

haydar

New member
If we think that web site code is;

<a>Hello 1 Abuzer<\a>
<a>Hello 2 Arif<\a>
<a>Hello 3 Hasan<\a>
<a>Hello 4 Ahmet<\a>

I want to extract the item between <a></a> which contains word "Arif" only.

Is it possible?

Thanks.
 
Last edited:

Abalsam

Active member
First question is Arif always next to </a>? Or can it be anywhere in the line? If it is always next to </a> then I would extract text of:

\<a\>[\w\s\d]+Arif\< please note that I have not yet figured out how to get it to match a / so I cut it off at the opening bracket <. Also please note that in order for this to work in regex you need to use the \ to escape characters or to signify special codes such as \w for letter \s for white space characters and \d for numbers.

Hope this helps.
 

Abalsam

Active member
I double checked regex sites and \/ SHOULD WORK but macrodroid is not processing it correctly. This might be a bug?
Thanks
 

Dm114

Well-known member
T
If we think that web site code is;

<a>Hello 1 Abuzer<\a>
<a>Hello 2 Arif<\a>
<a>Hello 3 Hasan<\a>
<a>Hello 4 Ahmet<\a>

I want to extract the item between <a></a> which contains word "Arif" only.

Is it possible?

Thanks.
You could try this one (check 'Group 1' option):
<a>Hello \d+ (Arif)<\\a>
Double '\' is to escape the backslash character. If it is a slash ('/'), don't escape it.
 
Top