|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
[PHP] ereg
non riesco a ricavare da questa stringa :
Codice:
window.location='http://cinema.ti-cket.ch/aa_ticket_new/film.asp?programma=848&film=386&cinema=2&ora=1';" onmouseout="this.style.backgroundColor='';this.style.color='#565656'"> Io sono riuscito ad arrivare fino qua Codice PHP:
|
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Nov 2003
Messaggi: 980
|
Ti sei dimenticato la virgoletta che chiude l'url, ma in ogni caso non funziona, l'operatore +, essendo greedy, prenderà tutto il testo fino all'ultima virgoletta '. Prova con
Codice PHP:
Ultima modifica di kk3z : 15-06-2008 alle 12:42. |
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
Ok funziona
però c'è ancora un piccolo problema... mi prende solo i primi due location che trova e non tutti... Il risultato è Codice PHP:
Codice HTML:
<tr onmouseover="this.style.backgroundColor='#565656';this.style.cursor='hand';this.style.color='#ffffff'" onclick="window.location='http://cinema.ti-cket.ch/aa_ticket_new/film.asp?programma=848&film=386&cinema=2&ora=1';" onmouseout="this.style.backgroundColor='';this.style.color='#565656'"> <td valign=top>IL CACCIATORI DI AQUILONI</td> </tr> <tr> <td valign=top bgcolor="#E4E4E4"><img src="/img/trasp.gif" width="1" height="1" alt=""></td> </tr> <tr onmouseover="this.style.backgroundColor='#565656';this.style.cursor='hand';this.style.color='#ffffff'" onclick="window.location='http://cinema.ti-cket.ch/aa_ticket_new/film.asp?programma=848&film=446&cinema=2&ora=2';" onmouseout="this.style.backgroundColor='';this.style.color='#565656'"> <td valign=top>FEEL THE NOISE</td> </tr> <tr> <td valign=top bgcolor="#E4E4E4"><img src="/img/trasp.gif" width="1" height="1" alt=""></td> </tr> <tr onmouseover="this.style.backgroundColor='#565656';this.style.cursor='hand';this.style.color='#ffffff'" onclick="window.location='http://cinema.ti-cket.ch/aa_ticket_new/film.asp?programma=848&film=420&cinema=2&ora=3';" onmouseout="this.style.backgroundColor='';this.style.color='#565656'"> <td valign=top>INDIANA JONES E IL REGNO DEL TESCHIO DI CRISTALLO</td> </tr> <tr> <td valign=top bgcolor="#E4E4E4"><img src="/img/trasp.gif" width="1" height="1" alt=""></td> </tr> <tr onmouseover="this.style.backgroundColor='#565656';this.style.cursor='hand';this.style.color='#ffffff'" onclick="window.location='http://cinema.ti-cket.ch/aa_ticket_new/film.asp?programma=848&film=439&cinema=2&ora=4';" onmouseout="this.style.backgroundColor='';this.style.color='#565656'"> <td valign=top>UN AMORE DI TESTIMONE</td> </tr> <tr> <td valign=top bgcolor="#E4E4E4"><img src="/img/trasp.gif" width="1" height="1" alt=""></td> </tr> <tr onmouseover="this.style.backgroundColor='#565656';this.style.cursor='hand';this.style.color='#ffffff'" onclick="window.location='http://cinema.ti-cket.ch/aa_ticket_new/film.asp?programma=848&film=374&cinema=2&ora=5';" onmouseout="this.style.backgroundColor='';this.style.color='#565656'"> <td valign=top>SOGNI E DELITTI</td> </tr> <tr> <td valign=top bgcolor="#E4E4E4"><img src="/img/trasp.gif" width="1" height="1" alt=""></td> </tr> <tr onmouseover="this.style.backgroundColor='#565656';this.style.cursor='hand';this.style.color='#ffffff'" onclick="window.location='http://cinema.ti-cket.ch/aa_ticket_new/film.asp?programma=848&film=448&cinema=2&ora=6';" onmouseout="this.style.backgroundColor='';this.style.color='#565656'"> <td valign=top>L'INCREDIBILE HULK</td> </tr> |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
up qualcuno sa aiutarmi?
|
|
|
|
|
|
#5 |
|
Senior Member
Iscritto dal: Nov 2003
Messaggi: 980
|
ereg ritorna non appena trova un match, prova con preg_match_all:
Codice PHP:
|
|
|
|
|
|
#6 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
Devo rompere ancora una volta
Codice HTML:
<div style="margin-bottom:5px; padding:0;"> <p style="font-weight:bold; float:left; margin:0; padding:0; width:50%; clear:both;">Bernina</p> <stato> Aperto</p> </stato><ora>17 giugno 2008 - 20.42</p> </div> Qualcuno sa aiutarmi? |
|
|
|
|
|
#7 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
UP
|
|
|
|
|
|
#8 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
UPPP
|
|
|
|
|
|
#9 |
|
Senior Member
Iscritto dal: May 2005
Messaggi: 340
|
up
|
|
|
|
|
|
#10 |
|
Senior Member
Iscritto dal: Nov 2003
Messaggi: 980
|
prova con
Codice PHP:
|
|
|
|
|
|
#11 | |
|
Senior Member
Iscritto dal: Nov 2003
Messaggi: 980
|
Quote:
in realtà avrei potuto usare solo "is" ma per comodità specifico tutti i modifier insieme (non si sa mai che qualche volta possono servire). In questo caso, nel primo esempio di "s" non ce n'era bisogno, nel secondo sì, essendo il contenuto del tag <stato> su più righe. |
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 08:14.



















