[SOLVED] Regex designer + test

Jor1s

Client
Регистрация
25.06.2012
Сообщения
216
Благодарностей
3
Баллы
0
Hi,

I'm trying to build a regex to find a password in a page, and as soon as i put some text in "After search test" and when i click on "TEST" button, it change to ('TEST 'Parsing...) load, load again, then make zenno crash :/

Here the part of the code which i'm trying to extract the pass :

Код:
<table id="signup-welcome" border="0">
<tbody><tr>
<td align="center" width="50%">
<h3>Identifiant ::</h3>
<p>dfgrfdg</p></td>
<td align="center" width="50%">
<h3>Mot de passe ::</h3>
<p>da4376</p>
</td>
So it goes on a question : what would yo put in "texte after search ? actually i'm trying to put "<h3>Identifiant ::</h3>
<p>" but it doesnt seems to work /

Thanks
 

lokiys

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

I'm trying to build a regex to find a password in a page, and as soon as i put some text in "After search test" and when i click on "TEST" button, it change to ('TEST 'Parsing...) load, load again, then make zenno crash :/

Here the part of the code which i'm trying to extract the pass :

Код:
<table id="signup-welcome" border="0">
<tbody><tr>
<td align="center" width="50%">
<h3>Identifiant ::</h3>
<p>dfgrfdg</p></td>
<td align="center" width="50%">
<h3>Mot de passe ::</h3>
<p>da4376</p>
</td>
So it goes on a question : what would yo put in "texte after search ? actually i'm trying to put "<h3>Identifiant ::</h3>
<p>" but it doesnt seems to work /

Thanks


(?<=<p>)[\w\W]*(?=</p></td>)
 
  • Спасибо
Реакции: Jor1s

Jor1s

Client
Регистрация
25.06.2012
Сообщения
216
Благодарностей
3
Баллы
0
Ok thx

IT still seems that the regex designer is a bit unstable, maybe cecause i had scrapebox runinng (since i close it it doesnt crash anymore), but still strange.
 

Thru_K

Client
Регистрация
04.07.2012
Сообщения
45
Благодарностей
12
Баллы
0
This one works:

(?<=<h3>Mot\ de\ passe\ ::</h3>\W+<p>).*(?=</p>)

\W+ is for non alphanumeric (line feed, carriage return, etc.) between </h3> and <p>

you can also use action "word processing" - regex: (?<=<p>).*(?=</p>) and take the second match
 
  • Спасибо
Реакции: Jor1s

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113

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