![]() |
![]() | #3 |
Консервативн Join Date: 01 2002 Location: Кавказская Албания
Posts: 889
Downloads: 0 Uploads: 0
Reputation: 0 | 0 | ![]()
Lol Acid , xoroshee reshenie. v C est' regexp.h (ya eto videl v Unixe), vot ego i vrubaem <img src="smooch-1.gif" border="0"> shablon napi****e sami <img src="wink-5.gif" border="0"> )) toje samoe mojno ocen' krasivo zdelat' v perle |
![]() |
![]() | #4 |
Дошкольник Join Date: 01 2002 Location: hell
Posts: 124
Downloads: 0 Uploads: 0
Reputation: 0 | 0 | ![]()
orinak php ov mi hat regexp a (chem stugel bayc senc mi ban petqa lini) preg_match_all("/^[0-9a-zA-Z_\.\-][email protected]([a-zA-Z0-9a-zA-Z_\-]+\.)+[a-zA-Z_]{2,}$/",$html,$matches) $matches @ darnuma mi hat array vori mej sagh gtac emailnerna preg_match_all -- Perform a global regular expression match Description int preg_match_all (string pattern, string subject, array matches [, int order]) Searches subject for all matches to the regular expression given in pattern and puts them in matches in the order specified by order. After the first match is found, the subsequent searches are continued on from end of the last match.
__________________ [x]-=-[ ]-=-[x] |
![]() |
![]() | #5 |
¡no pasaran! Join Date: 03 2002 Location: localhost Age: 39
Posts: 540
Downloads: 0 Uploads: 0
Reputation: 13 | 4 | ![]() predyduschij primer nepravil'nyj!!! est' oshibka b regexpe dlja preg_match_all (`^` i `$` ne imeet smysla ispol'zovat' i objazatelen modifikator `s` dlja mnogostrochnogo texta) this should work Code: <? $test = "gashfjgsdk mailto:[email protected] hsf \n jdkshhs [email protected]"; if(preg_match_all("/[0-9a-zA-Z_\.\-][email protected][a-zA-Z0-9a-zA-Z_\-\.]+\.[a-zA-Z_]{2,}/s",$test,$matches,PREG_SET_ORDER)) { foreach($matches as $m) { echo $m[0]."<br>\n"; } } else { echo 'zzzzZZZ'; } ?> |
![]() |
Sponsored Links |