Re: [PHP] regular expresion

2005-02-02 Thread Richard Lynch
php wrote: > I want to parse a html file > for instance > > > aaa > aaa hhh > aaa eee > aaa > > > and I want to create a regular expresion wich is able to extract entire > text > from enclosed tags WITHOUT a

Re: AW: [PHP] regular expresion

2005-02-02 Thread Stian Berger
Use strip_tags() instead of regex. http://www.php-center.de/en-html-manual/function.strip-tags.html Greetings Mirco -Ursprüngliche Nachricht- Von: php [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 2. Februar 2005 09:25 An: php-general@lists.php.net Betreff: [PHP] regular expresion I wan

AW: [PHP] regular expresion

2005-02-02 Thread Mirco Blitz
Hi, Use strip_tags() instead of regex. http://www.php-center.de/en-html-manual/function.strip-tags.html Greetings Mirco -Ursprüngliche Nachricht- Von: php [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 2. Februar 2005 09:25 An: php-general@lists.php.net Betreff: [PHP] regular

[PHP] regular expresion

2005-02-02 Thread php
I want to parse a html file for instance aaa aaa hhh aaa eee aaa and I want to create a regular expresion wich is able to extract entire text from enclosed tags WITHOUT a particular word for example

Re: [PHP] Regular Expresion Work on IP address

2002-12-05 Thread DL Neil
Dev, Nice work! Thanks for implementing the book's algorithm/proving it in PHP-PCRE, and I do like your extension into an internal/external function. I've not implemented your code (bookmarked for later) but some initial comments: - don't forget some of the other 'funnies' in the IP addressing sc

Re: [PHP] Regular Expresion Work on IP address

2002-12-04 Thread Dev
Well after reading John'ss and DL Neil's replys i came up with 2 functions. The first is to check to see if the entry is a valid IP address and the Next is to determine if it is a Private Network IP or not!. You can see this in action at: http://www.my-tangled-web.net/codebank/code/ip_check.php a

Re: [PHP] Regular Expresion Work on IP address

2002-12-04 Thread DL Neil
John, > I think it'd be hard to verify the range with a regex. ip2long and long2ip > do not validate. So, an option would be to write your own little function > that splits the $ip on the period, verifies there are 4 parts, then checks > that each part is between 1 and 255 inclusive. My other po

Re: [PHP] Regular Expresion Work on IP address

2002-12-04 Thread DL Neil
Hello Dev, > Now I am continuing on with the same script and I need to check for valid > IP address form. > Currently I have: > > $ip="255.255.255.0"; > if (preg_match ("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/", $ip)) { > print "Good Ip"; > } else { > print "Bad Ip"; > } > > Thi

Re: [PHP] Regular Expresion Work on IP address

2002-12-04 Thread 1LT John W. Holmes
> Now I am continuing on with the same script and I need to check for valid > IP address form. > Currently I have: > > $ip="255.255.255.0"; > > if (preg_match ("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/", $ip)) { > print "Good Ip"; > } else { > print "Bad Ip"; > } > > This does wor

[PHP] Regular Expresion Work on IP address

2002-12-04 Thread Dev
Hello all, Let me first say thank you to Jason Wong and Adam Voigt for their help on my problem with Multidimensional Arrays!!! Now I am continuing on with the same script and I need to check for valid IP address form. Currently I have: $ip="255.255.255.0"; if (preg_match ("/[0-9]{1,3}\.[0-9

[PHP] regular expresion

2001-10-19 Thread Richard
Hi, I want to validate that a variable only contains numbers. I came up with this code $variable = "154545"; -> must give me true. $variable = "$%54545"; -> must give me false $variable = "$%54545"; -> must give me false $variable = "4545;#"; -> must give me false $variable = "004545"