[SOLVED] Match numbers not going into a variable?

  • Автор темы Автор темы jp1
  • Дата начала Дата начала

jp1

Client
Регистрация
23.01.2011
Сообщения
234
Реакции
2
Баллы
0
When I take DOM, and select 'What to take', I can get First to extract the first result of my regex because I can put it in a variable. But when I select 'Match no.1' to get a specific match, I can't put it in a variable. Is this a bug or is there another way to extract data that isn't by putting it into a variable?
 
You mean in the section Tab data/ What to take: ?

Because there, First and One Match work for me. They allow me to create a variable, and when I click close window an alert asks me 'Variable doesn't exist. Create it?

But when I choose What to take: All or Match No. X, it doesn't ask me this and doesn't allow me to create a variable or to put it into an already existing variable. ZP is on a virtualbox with windows 7 and only 1gb ram but this surely can't be the problem, maybe it's a bug?
 
Match. No and All allow you to save several values. That's why you can use only lists here and not variables.
 
Doesn't match No. allow me to save the match number of a given regular expression on a DOM text? I'm taking text from a webpage, not from a list! So surely it's a bug?

What I mean is:

There's the DOM
I 'Take DOM'
I select a match no. 4 of a regexp
And try to create a variable or add it to a variable already created, but it won't budge. It doesn't allow me to 'Put to Variable'.
 
It's not a bug.

You use First and One match if you need to save 1 value to variable.
And use Match No. and All when you need to save several values to list.
 
Oh, ok I understand. I was fixated on match No., thinking it was the match number, whereas it's 'One match' that does the function I was looking for! I had somehow thought One match was unchangeable from the default 'Last', which was very stupid of me, but mostly I was just fixated on Match No.

I agree, it's solved.

While I'm here, what does Match No. do actually?
 
You can use ranges there.
 

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