Filter number using regex

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

Animo

Новичок
Регистрация
22.10.2012
Сообщения
2
Реакции
0
Баллы
0
Hello guys, I'm really new to this..

Can explain how to filter this url?

Код:
Развернуть Свернуть Копировать
<h3 class="entrytitle" id="post-[B]204224[/B]"> <a href="http://www.iwant.this/url/" rel="bookmark">

i can use this regex

Код:
Развернуть Свернуть Копировать
(?<=<h3\ class="entrytitle"\ id="post-204224">\ <a\ href=").*(?="\ rel="bookmark">)

to get the url but post id numbers id="post-204224" always change, how will i get the url every time?

Tq guys.. appreciate the help.
 
here you go:

(?<=<h3\ class="entrytitle"\ id="post-.*">\ <a\ href=").*?(?=")
 
In regex you can choose "text starts with" as : <h3 class="entrytitle" id="
and "text ends with": "> <a href="http://www.iwant.this/url/" rel="bookmark">

GL
 
Thank you both for solving my problem.. It's fixed now.. once again.. thank you.
 

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