[HELP] Regex to scrap hidden input

PapyRef

Client
Регистрация
28.02.2012
Сообщения
70
Благодарностей
6
Баллы
0
I want to scrap value of hidden field

Код:
<FORM onsubmit="javascript:return add();" method=post action=ajout_message.php>
....
<INPUT name=hyds2 value=[COLOR=#0000ff]1234 [/COLOR]type=hidden>
....
</FORM>
With regular expression : (?<=\<INPUT.*value\=).*?(?= type\=hidden\>) I got result 1234. It's OK
but sometimes the fields are not in the same order and in lowercase or uppercase

eg :
<INPUT type=hidden name=hyds2 value=1234>
<input name=hyds2 type=hidden value=1234>
<INPUT value=1234 type=hidden name=hyds2>
....

Anyone know how I can do that in regular expression builder ?
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Use the pipe(|) for your regex to get multiple matches and you can also use the ?i: to get upper or lowercase.
 

PapyRef

Client
Регистрация
28.02.2012
Сообщения
70
Благодарностей
6
Баллы
0
I do not know much about regular expressions. where do i put the expression "?i:" Have you some examples ?

OK i found to get upper or lowercase. It's : (?i)(?<=\<input.*value\=).*?(?=\>)

I found a solution without regular expressions using HTML element and add a few search criterias.
 
Последнее редактирование:

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