How to find a line in a table with a specific word and get its row number?

ninny83

Client
Регистрация
10.05.2011
Сообщения
86
Благодарностей
8
Баллы
0
Hello Guys,

I have this table:

category1,url1,etc..
category1,url2,etc..
category1,url3,etc..
category2,url4,etc..

How can I get the row numbers of that specific lines containing the "category1" keyword ? (e.g. the category1 is contained in row n° 0,1,2)

I need to get those numbers to set the value of a specific select option.

Thank you!!

Ciao
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
The only way i see is to create a loop.

Take line - add to variable, parse it with word processing to find out if it has something you need, then counter +1 and take next line
Until you find it.
 
  • Спасибо
Реакции: BFlame6 и ninny83

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