AKB Forums

Go Back   AKB Forums > Technical sections > Algorithms
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Algorithms The source of algorithms for your project

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Feb 4, 2002, 03:59   #1
»
 
z0mbie's Avatar
 
Join Date: Jan 2002
Posts: 776
Rep Power: 7
Reputation: 10
Send a message via ICQ to z0mbie
Post emails from HTML

v obshem nado poluchit' e-mail adresa iz html file-ov, tol'ko proveryat' kazhdoe slovo mail eto ili net slishkom dolgo..
u kogo-nit' est' soobrazheniya po etomu povodu ?
z0mbie is offline   Reply With Quote Quote selected
Old Feb 4, 2002, 04:31   #2
Administrator
 
acid's Avatar
 
Join Date: Sep 2001
Location: Yerevan, Armenia
Posts: 7,086
Blog Entries: 15
Rep Power: 10
Reputation: 251
Talking

LOL, pochemu kazhdoe slovo? ishesh sobachku (@), potom right poka ne naidesh tochku i left poka ni zakonchatsja alfanumeric...
po moemu tak.
__________________
Chat with acid


acid is offline   Reply With Quote Quote selected
Old Feb 4, 2002, 05:49   #3
Консервативный Демагог
 
VX's Avatar
 
Join Date: Jan 2002
Location: Кавказская Албания
Posts: 889
Rep Power: 7
Reputation: 10
Post

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
__________________
Праздник к нам приходит...

|^^^^^^^^^'''^\| ||\__
| ВОДКА-ВОДКА | ||','''|'''''''\_____,_
| _..... _ | ||_ _|'__|_____||.........| |
'(@)'(@)'(@)''''''''''''''''''''''*|(@)""""|(@)*
VX is offline   Reply With Quote Quote selected
Old Feb 4, 2002, 05:59   #4
Дошкольник
 
Dark Abyss of Yerevan's Avatar
 
Join Date: Jan 2002
Location: hell
Posts: 124
Rep Power: 7
Reputation: 10
Send a message via ICQ to Dark Abyss of Yerevan
Post

orinak php ov mi hat regexp a
(chem stugel bayc senc mi ban petqa lini)

preg_match_all("/^[0-9a-zA-Z_\.\-]+@([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]
Dark Abyss of Yerevan is offline   Reply With Quote Quote selected
Old Mar 21, 2002, 17:22   #5
¡no pasaran!
 
dolphin's Avatar
 
Join Date: Mar 2002
Location: localhost
Posts: 538
Rep Power: 7
Reputation: 23
Send a message via ICQ to dolphin
Exclamation

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 = &quot;gashfjgsdk mailto:dolphin@freenet.am hsf \n jdkshhs me@some.other.net&quot;;

if(preg_match_all(&quot;/[0-9a-zA-Z_\.\-]+?@[a-zA-Z0-9a-zA-Z_\-\.]+\.[a-zA-Z_]{2,}/s&quot;,$test,$matches,PREG_SET_ORDER)) {

    foreach($matches as $m) {
        echo $m[0].&quot;<br>\n&quot;;
    }

}
else {
    echo 'zzzzZZZ';
}

?>
__________________
[ que fors aus ne le sot riens nee ]
dolphin is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:52.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link