View previous topic :: View next topic
Author
Message
gog Joined: 18 Jun 2004 Posts: 679 Location: zagreb
Posted: 12.06.2006 08:38 Post subject: regexp
Trebam regular expression koji bi mi našao iz nečega tipa:
Code: <a href="/novosti/one.php?sid=ID_NOVOSTI" class="NasloviVijesti">Naslov novosti</A>
izvukao ID-NOVOSTI (može i čitav link), te Naslov novosti...
Back to top
unique Joined: 29 Mar 2004 Posts: 655
Posted: 12.06.2006 12:35 Post subject:
mozda bi bilo bolje to parsat u DOM i onda nac
a regex, mozda bi ovaj mogao radit (i case insensitve matching, i nemoj zaboravit escapeat znakove ako ce to bit u codu...)
Code: \?sid=([0-9]+)" class="blabla">([^<]+)</a>
btw, php?
_________________ Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE!
Back to top
gog Joined: 18 Jun 2004 Posts: 679 Location: zagreb
Posted: 12.06.2006 13:45 Post subject:
Da, php... tnx, ovo gore je pomoglo...
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
Powered by phpBB © 2001, 2005 phpBB Group