Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php]wyrazenia_regularne+www
-bananos-
post
Post #1





Goście







ja napisac wyrazenie regularne ktore sprawdzi czy podany adres www jest prawidlowy?
Go to the top of the page
+Quote Post
mike
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

Ostrzeżenie: (0%)
-----


How to Find or Validate an Email Address
Go to the top of the page
+Quote Post
specialplan
post
Post #3





Grupa: Zarejestrowani
Postów: 206
Pomógł: 21
Dołączył: 1.09.2006
Skąd: Edinburgh

Ostrzeżenie: (0%)
-----


Ja uzywam takiego:

  1. <?php
  2. preg_match('&^(?:("s*(?:[^"f\nr\tvbs]+s*)+")|([-w!#$%&'*+~/^`|{}]+(?:.[-w!#$%&'*+~/^`|{}]+)*))@((([)?(?:(?:(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:[0-1]?[0-9]?[0-9])).){3}(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:[0-1]?[0-9]?[0-9]))))(?(5)])|((?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?.)*[a-z](?:[-a-z0-9]*[a-z0-9])?).((?:([^-])[-a-z]*[-a-z])?))$&xi', $mail);
  3. ?>
Go to the top of the page
+Quote Post
-bananos-
post
Post #4





Goście







ale chodzi mi o strone www... a nie e-mail ;]
ma ktos pomysl?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post
specialplan
post
Post #5





Grupa: Zarejestrowani
Postów: 206
Pomógł: 21
Dołączył: 1.09.2006
Skąd: Edinburgh

Ostrzeżenie: (0%)
-----


  1. <?php
  2. preg_match('"^https?://([a-zd]([a-zd-]{0,61}[a-zd])?.)+[a-z]{2,4}'.'(/'.'(([w.-]|(%[da-f]{2}))*([w-]|(%[da-f]{2}))/?)*'.'(?[a-z]([w-.&=]|(%[da-f]{2}))*)?'.'(#[a-z][w:.-]*)?'.')?$"i', $URL);
  3. ?>
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.12.2025 - 23:23