RE: [PHP] Re: eregi problem

2005-04-04 Thread Kim Madsen
-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 witx a-z

Re: [PHP] Re: eregi problem

2005-04-04 Thread M. Sokolewicz
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 witx

RE: [PHP] Re: eregi problem

2005-04-04 Thread Kim Madsen
-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 that if

Re: [PHP] Re: eregi problem

2005-04-04 Thread M. Sokolewicz
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

[PHP] Re: eregi problem

2005-04-03 Thread andreja
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]

[PHP] Re: eregi problem

2005-04-03 Thread andreja
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'; It

[PHP] Re: eregi problem

2005-04-03 Thread M. Sokolewicz
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

[PHP] Re: eregi expression for checking a domain

2005-03-14 Thread Jason Barnett
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? |

[PHP] Re: eregi expression for checking a domain

2005-03-13 Thread Jim Plush
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

[PHP] Re: eregi expression for checking a domain

2005-03-13 Thread Jim Plush
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

[PHP] Re: eregi filter stopping valid email address, part two

2004-01-06 Thread Manuel Lemos
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.

[PHP] Re: eregi function?

2003-11-25 Thread Justin Patrin
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 br) after each ;, } or {. here is what I have so far... while($b =

[PHP] Re: eregi(mail)

2002-05-10 Thread Manuel Lemos
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 want to

[PHP] Re: eregi()

2002-03-19 Thread Philip Hallstrom
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 work

[PHP] Re: Eregi for Image

2001-08-26 Thread jimw
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 the file to

[PHP] Re: eregi replace help

2001-07-07 Thread maatt
ereg_replace(gt; [^]*/a, , $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: a href=http://www.example.com/1.html;