I want to parse a html file
for instance
body
paaa /p
baaa hhh /b
paaa eee /p
iaaa /i
/body
and I want to create a regular expresion wich is able to extract entire text
from enclosed tags WITHOUT a particular
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
/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 want to parse a html file
for instance
body
paaa /p
baaa hhh
php wrote:
I want to parse a html file
for instance
body
paaa /p
baaa hhh /b
paaa eee /p
iaaa /i
/body
and I want to create a regular expresion wich is able to extract entire
text
from enclosed tags
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
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
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 work kinda. It checks
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;
}
This does work kinda.
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 post
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
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; - must
11 matches
Mail list logo