Autor | Zpráva | ||
---|---|---|---|
Anonymní Profil * |
#1 · Zasláno: 15. 3. 2008, 22:27:45
cauko
pokusal som sa spravit reg. vyraz ktory vyberie vsetky taky img (t.j. <img HOCICO>) vypotil som nieco taketo preg_match_all("/<img(.*)/",$page,$out); skusal som to aj modifikovat napr. <img(.*)> <img(.*)>$ <img(.*)>{1,1} <img(.*)[^>] ale bez uspechu zaciatok je dobre ale nikdy to korektne neukonci tu je priklad vysledkov ktore hadzala vacsina vyrazov co som skusal [0] => <img src='http://img.funny.sk/top.gif' width='720' height='50' border='0' alt='' usemap='#top'></td></tr> [1] => <img src='http://img.funny.sk/www/bodc.gif' width='2' height='70' border='0' alt=''></td> [2] => <img src='http://www.adring.sk/funny/adcycle.fcgi?gid=&id=7483' width=468 height=60 border=1 ALT='Click to Visit'></a> [3] => <img src='http://img.funny.sk/www/bodc.gif' width='2' height='70' border='0' alt=''></td> [4] => <img src='http://img.funny.sk/www/bodc.gif' width='2' height='12' border='0' alt=''></td> [5] => <img src='http://img.funny.sk/www/bodc.gif' width='2' height='12' border='0' alt=''></td> [6] => <img src='http://img.funny.sk/www/bodc.gif' width='2' height='70' border='0' alt=''></td> [7] => <img src='http://img.funny.sk/pradlo/luxusnepradlo.jpg' width=110 height=163 border=2 alt='LuxusnePradlo.sk - luxusné dámske spodné prádlo'><br> [8] => <img src='http://img.jumbo.sk/jumbo_130x46.gif' width=130 height=46 border=0 alt='Jumbo.sk - internetové obchody - zoznam obchodov' vspace='8'></a> [9] => <img src='http://img.funny.sk/luxusnepradlo.gif' width='130' height='50' border='0' alt='LuxusnePradlo.sk - luxusné dámske spodné prádlo' vspace='8'></a><br> [10] => <img src='http://img.funny.sk/parfemy.gif' width='140' height='48' border='0' alt='Parfemy SvetVoni.sk' vspace='8'></a><br> [11] => <img src='http://img.funny.sk/oh.gif' width='110' height='16' border='0' alt='Onlinehry.sk' vspace='8'></a><br> [12] => <img src='http://img.funny.sk/www/empty.gif' width='1' height='200' border='0' alt=''></td> [13] => <img src='http://img.funny.sk/pix/0585.jpg' border=1 alt='' width=350 height=378><br> [14] => <img src='http://img.funny.sk/www/vezen.gif' width=120 height=88 border=0> [15] => <img src='http://img.funny.sk/mobilmania/rep.gif' align='left' border=0></a> [16] => <img src='http://img.funny.sk/mobilmania/rep.gif' align='left' border=0></a> [17] => <img src='http://img.funny.sk/mobilmania/rep.gif' align='left' border=0></a> [18] => <img src='http://img.funny.sk/mobilmania/rep.gif' align='left' border=0></a> proste potrebujem aby pri prvom > uz nesiel dalej a neboli tam te tagy na konci |
||
krteczek_jinde Profil * |
#2 · Zasláno: 15. 3. 2008, 22:35:15
skus toto:
'/<img(.*[^>])>/' |
||
Anonymní Profil * |
#3 · Zasláno: 15. 3. 2008, 22:58:51
hadzalo mi to to iste...stale boli na konci te tagy..
|
||
Gandalf Profil * |
#4 · Zasláno: 16. 3. 2008, 20:00:45
'/<img(.*[^>])>/'
a co tohle? '/<img([^>]*)/' |
||
nightfish Profil |
#5 · Zasláno: 16. 3. 2008, 20:19:43
preg_match_all("/<img(.*)>/U",$page,$out); |
||
Gandalf Profil * |
#6 · Zasláno: 16. 3. 2008, 21:08:37
preg_match_all("/<img(.*)>/U",$page,$out);
co když budou v řetězci dva nebo více tagů img za sebou nebo mezi textem a budu je chtít nečím třeba nahradit... nenahradí je to všechny??? tedy nebude je tohle brát jako jeden img? Nemám vyzkoušené, ale řekl bych že ano.... |
||
nightfish Profil |
#7 · Zasláno: 16. 3. 2008, 21:18:53
Nemám vyzkoušené
tak vyzkoušej |
||
Gandalf Profil * |
#8 · Zasláno: 16. 3. 2008, 21:27:22
tak vyzkoušej
jo máš pravdu, ale maká i to moje, jen jsem tam pozapoměl uzavření tagu img '/<img([^>]*)>/' |
||
Časová prodleva: 16 let
|
0