Regex Challenge: Extracting Specific Group Data?

Pierre Paul Jacques

Активный пользователь
Регистрация
08.10.2023
Сообщения
123
Благодарностей
33
Баллы
28
Hi i am back again,
from this post :


I made a new regex working with all the website using the extension ( and not only the one from the exemple)
<link rel="alternate" hreflang="[a-z-]+" href="([^"]+)"

But i got a new trouble trouble :
113889


I have to manage/select groups,
the best way to do it i guess is by doing output by table and exclude the columns? ( 0 in my case)


113888


Because from what i understood it is no possible to do it directly by the Regex...
Did i miss something or there is better way?

Thank by advance

PS : i did it also by C# but the goal of my question is to understand better Zenno,)

113890



C#:
//our list that we just made with regex
var list = project.Lists["Regex"];


if (list != null && list.Count > 0)
{
    // Iterate through the list
    for (int i = 0; i < list.Count; i++)
    {
        // Get the current item from the list
        var currentItem = list[i];

        Tab tab = instance.NewTab(i.ToString());
        tab.Navigate(currentItem.ToString());
    }
}
 

myndeswx

Client
Регистрация
15.05.2017
Сообщения
418
Благодарностей
95
Баллы
28
Probably just need to adjust the regex, save page source to variable, open it up in notepad and in regex helper, from there play around with building regexes and it will work
 
  • Спасибо
Реакции: Pierre Paul Jacques

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 771
Благодарностей
1 183
Баллы
113

Pierre Paul Jacques

Активный пользователь
Регистрация
08.10.2023
Сообщения
123
Благодарностей
33
Баллы
28
Thank for your both answer!
I will try again with different regex,
do you have any advice about the best way to manage "group" in Zenno,
it must be by table?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 771
Благодарностей
1 183
Баллы
113
Thank for your both answer!
I will try again with different regex,
do you have any advice about the best way to manage "group" in Zenno,
it must be by table?
The best advice is to develop your own systems and logics, by testing and trying.
Don't hesitate to ask for help if you are stuck a long time on one thing.

There is no right or wrong way.
There is only if it works or doesn't. :-)

Don't worry too much about this way or that way. Just make it work and move on.

Cheers
 
  • Спасибо
Реакции: Pierre Paul Jacques

MaiyaBeier

Новичок
Регистрация
04.12.2023
Сообщения
1
Благодарностей
1
Баллы
3
  • Спасибо
Реакции: Pierre Paul Jacques

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