Kim Madsen wrote:
-Original Message-
From: M. Sokolewicz [mailto:[EMAIL PROTECTED]
Sent: Monday, April 04, 2005 3:08 PM
Putting the ^ _inside_ [] means NOT, so if any of the chars a-z0-9 is in
the string it´s NOT matched.
actually, that's not entirely correct. The regexp basically means
> -Original Message-
> From: M. Sokolewicz [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 04, 2005 3:08 PM
> > Putting the ^ _inside_ [] means NOT, so if any of the chars a-z0-9 is in
> the string it´s NOT matched.
> actually, that's not entirely correct. The regexp basically means tha
Kim Madsen wrote:
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 03, 2005 6:03 PM
To: php-general@lists.php.net
Subject: [PHP] Re: eregi problem
i'm not familliar with regular expresions but i think that ^a-z - means
that variable must start
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Sunday, April 03, 2005 6:03 PM
> To: php-general@lists.php.net
> Subject: [PHP] Re: eregi problem
>
> i'm not familliar with regular expresions but i think that ^a-z - means
>
you'd be better off with something like
if(preg_match('#^[a-z0-9]+$#i', $GP['sifre'])) {
echo 'contains only alphanumeric chars';
} else {
echo 'contains characters which are not alphanumeric';
}
- tul
[EMAIL PROTECTED] wrote:
I really dont know :)
<[EMAIL PROTECTED]> wrote in mess
I really dont know :)
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha
> numeric chars only. here, how I check the variable:
>
> if((eregi("[^a-zA-Z0-9]",$GP[sifre])
>echo 'true';
> else
>echo 'false';
i'm not familliar with regular expresions but i think that ^a-z - means
that variable must start witx a-z characters
you can chek it here:
http://www.php.net/manual/en/reference.pcre.pattern.syntax.php
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I m trying to check $GP[sifre
Ross Hulford wrote:
> Does anyone know a working eregi expression for determining a domain is
> valid? don't need the http:// just looking for www.thedomain.com
>
> cheers,
>
>
> R.
parse_url()
http://php.net/manual/en/function.parse-url.php
--
Teach a man to fish...
NEW? | http://www.catb.org/
also, note I used preg_match instead of ereg, preg is a better choice
over ereg usually (flexibility, speed, etc)
Ross Hulford wrote:
Does anyone know a working eregi expression for determining a domain is
valid? don't need the http:// just looking for www.thedomain.com
cheers,
R.
--
PHP Gener
this should work for any web address starting with www.
// test for domain
$domain = "www.example.com";
// This pattern will match anything that STARTS with www followed by a
period, followed by at least 2 characters,
// numbers and periods followed by a period followed by at least two
characters
Hello,
On 01/06/2004 01:52 PM, Dave G wrote:
A while ago on this list I posted a few questions about an eregi
filter for email addresses entered into a form. With the help of people
on this list, I settled on the following code which has worked fine in
the months since I started using it.
Jas wrote:
Not sure how to do this but I have a call to a database which pulls the
contents of a table into an array and I need a eregi string which will
sift through the contents and put a line break (i.e. \n or ) after
each ";", "}" or "{". here is what I have so far...
while($b = mysql_fet
Hello,
On 05/10/2002 01:48 PM, Liam Gibbs wrote:
> Does anyone have a decent eregi statement for
> validating e-mail addresses? I've tried the ones on
> the site, but there seems to be small bugs with each
> of them. They tell me that [EMAIL PROTECTED] is an
> invalid e-mail address.
You may wan
Try www.zend.com in the application/code gallery. I've seen code that
does this...
On Tue, 19 Mar 2002, Vlad Kulchitski wrote:
> Hi,
>
> Can any1 send a small script of how to valiade a username using eregi().
>
> I want username to consist only a-zA-Z1-0, "_", and "-"
>
> I can't get it to wor
s
Web Application Security - www.whitecrown.net
*/
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 26, 2001 5:32 PM
Subject: [PHP] Re: Eregi for Image
| Jeff Oien <[EMAIL PROTECTED]> wrote:
| > I want to check if an uploa
Jeff Oien <[EMAIL PROTECTED]> wrote:
> I want to check if an uploaded file is an image. This isn't working.
> Could anyone help me out?
>
> if (!eregi("\\.gif$", $img1_name) ||
> !eregi("\\.jpg$", $img1_name) ||
> !eregi("\\.jpeg$", $img1_name)) {
>error message
> }
unless you expect
ereg_replace("> <[^<]*", "", $string);
or
ereg_replace("&.*\n", "", $string) if the unwanted bits end in new-lines
??
"Richard van Leeuwen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I want to delete some lines
>
> original:
>
> http://www.example.com/1
17 matches
Mail list logo