Re: [PHP] Eregi error

2007-03-01 Thread Nicholas Yim
Hello Brad, suggest to use preg_* instead of ereg_* extension is useless Best regards, === At 2007-03-01, 11:12:52 you wrote: === Hey all, I have been having some trouble with the eregi function. I have the following piece of code in my application: function

Re: [PHP] Eregi error

2007-03-01 Thread M.Sokolewicz
I agree with the first part, that it is in many cases better to use the Perl Compatible Regular Expressions (PCRE, preg_*) than the POSIX compatible ones (ereg[i]_*). However, I don't quite get what you mean by extension is useless ? What extension...?? and why would it be useless? (useless in

Re: [PHP] Eregi error

2007-03-01 Thread Myron Turner
M.Sokolewicz wrote: Hey all, I have been having some trouble with the eregi function. I have the following piece of code in my application: function standard_input($input, $min=0, $max=50){ if (strlen($input) = $max and strlen($input) = $min ) { $pattern = '^[a-z0-9\!\_

Re: [PHP] Eregi error

2007-03-01 Thread Roberto Mansfield
Myron Turner wrote: M.Sokolewicz wrote: $pattern = '^[a-z0-9\!\_ \.- ,/]*$'; if(!eregi($pattern, $input)){ the problem is that the hyphen is interpreted as regex range operator: [a-z0-9\!\_ \.- ,/] Rewrite this as

Re: [PHP] Eregi error

2007-03-01 Thread Richard Lynch
On Wed, February 28, 2007 9:08 pm, Brad wrote: I have been having some trouble with the eregi function. I have the following piece of code in my application: function standard_input($input, $min=0, $max=50){ if (strlen($input) = $max and strlen($input) = $min ) {

Re: [PHP] Eregi error

2007-03-01 Thread Myron Turner
Roberto Mansfield wrote: Myron Turner wrote: M.Sokolewicz wrote: $pattern = '^[a-z0-9\!\_ \.- ,/]*$'; if(!eregi($pattern, $input)){ the problem is that the hyphen is interpreted as regex range operator:

Re: [PHP] Eregi error

2007-03-01 Thread Richard Lynch
On Thu, March 1, 2007 6:14 pm, Myron Turner wrote: Roberto Mansfield wrote: Myron Turner wrote: M.Sokolewicz wrote: $pattern = '^[a-z0-9\!\_ \.- ,/]*$'; if(!eregi($pattern, $input)){ the problem is that the hyphen is interpreted as regex range operator:

[PHP] Eregi error

2007-02-28 Thread Brad
Hey all, I have been having some trouble with the eregi function. I have the following piece of code in my application: function standard_input($input, $min=0, $max=50){ if (strlen($input) = $max and strlen($input) = $min ) { $pattern = '^[a-z0-9\!\_ \.- ,/]*$';

RE: [PHP] Eregi error

2007-02-28 Thread Peter Lauri
Subject: [PHP] Eregi error Hey all, I have been having some trouble with the eregi function. I have the following piece of code in my application: function standard_input($input, $min=0, $max=50){ if (strlen($input) = $max and strlen($input) = $min ) { $pattern = '^[a-z0

[PHP] eregi problem

2005-04-03 Thread emre
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 works if variable starts with alphabetic chars only. for example this returns 'ok'

Re: [PHP] eregi problem

2005-04-03 Thread BAO RuiXian
[EMAIL PROTECTED] wrote: I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha numeric chars only. here, how I check the variable: Try this: if(eregi(^[a-zA-Z0-9]+$,$GP[sifre])) The above say that between the beginning of the string ^ and the end of the string $,

Re: [PHP] eregi problem

2005-04-03 Thread Josip Dzolonga
[EMAIL PROTECTED] wrote: if((eregi([^a-zA-Z0-9],$GP[sifre]) I think that the ^ anchor is your problem, it shall be out of the brackets : if (eregi(^[a-zA-Z0-9]+$, $GP['sifre'])) echo 'true'; else echo 'false'; (the above is tested and works perfect) P.S. Take a look here

[PHP] eregi expression for checking a domain

2005-03-13 Thread Ross Hulford
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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP: Eregi multi-line question

2004-03-25 Thread PHPDiscuss - PHP Newsgroups and mailing lists
?php $rootPath = ; $cacheTime= 0; $Diff = (time() - filemtime($rootPath.stuff.dat))/60; $cntrp=0; $cntrb=0; $cntrt=0; $cntrd=0; $cntrc=0; if ($Diff $cacheTime) { $file = fopen (local file, r); if (!$file) {

[PHP] PHP: eregi multi-line Question

2004-03-25 Thread PHPDiscuss - PHP Newsgroups and mailing lists
?php $rootPath = ; $cacheTime= 0; $Diff = (time() - filemtime($rootPath.stuff.dat))/60; $cntrp=0; $cntrb=0; $cntrt=0; $cntrd=0; $cntrc=0; if ($Diff $cacheTime) { $file = fopen (local file, r); if (!$file) {

Re: [PHP] PHP: Eregi multi-line question

2004-03-25 Thread John W. Holmes
From: PHPDiscuss - PHP Newsgroups and mailing lists [EMAIL PROTECTED] if (eregi ('trtd valign = topspan class = gray' . '[.+]' '/span/td/tr/table', $line, $cont)) [.+] is going to match a literal period or plus sign and only one of them. You either want just .+ to match one or more

[PHP] eregi for alpha-numeric, punctuation whitespace?

2004-03-22 Thread Jas
Not sure how to accomplish this, and not completely familiar with all the options available with regular expressions. I need to sanitize input data by only allowing alpha-numeric characters, whitespace, punctuation (,.;:) and of course carrige returns. here is what I have so far...

[PHP] Eregi question

2004-03-11 Thread Dave Carrera
Hi List, I Know this is basic and I am sorry to bother the list with this question but I am confused, probably working to hard :-) I want to end up with a part of a string returned by $_POST to work with in my function. The string might be put into the text box like so, its a domain name

Re: [PHP] Eregi question

2004-03-11 Thread Da Koenich
hi dave, try this: $temp = explode('.',$_POST['variable']); $domainname = $temp[1]; greetz da koenich Hi List, I Know this is basic and I am sorry to bother the list with this question but I am confused, probably working to hard :-) I want to end up with a part of a string returned by

Re: [PHP] Eregi question

2004-03-11 Thread Jason Wong
On Thursday 11 March 2004 22:50, Dave Carrera wrote: I want to end up with a part of a string returned by $_POST to work with in my function. The string might be put into the text box like so, its a domain name checker, http://www.domainname.com I have already got rid of the http:// and

RE: [PHP] Eregi question

2004-03-11 Thread Dave Carrera
PROTECTED] Subject: Re: [PHP] Eregi question hi dave, try this: $temp = explode('.',$_POST['variable']); $domainname = $temp[1]; greetz da koenich Hi List, I Know this is basic and I am sorry to bother the list with this question but I am confused, probably working to hard :-) I want to end

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

2004-01-06 Thread Dave G
PHP Gurus 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. The code is this: eregi('[EMAIL

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

2004-01-06 Thread Ford, Mike [LSS]
On 06 January 2004 15:53, Dave G wrote: PHP Gurus 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

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

2004-01-06 Thread CPT John W. Holmes
From: Dave G [EMAIL PROTECTED] 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. The code is this:

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

2004-01-06 Thread Dave G
Mike, No. You've only allowed for hyphens in the first element after the @ sign -- this address has them in the 2nd element. Ah, yes, I guess I had it that way because there are no hyphens in top level domain designations, but hadn't accounted for the fact that it would exclude them if

[PHP] Re: PHP eregi filtering problem

2003-12-08 Thread Sven
Purpleonyx schrieb: Greetings all, I ran into a problem today and was hoping someone could provide an answer. I am fetching a web page, and attempting to parse certain variables from it. I've done this plenty of times in the past with no problem. The only difference this time is the file that I

[PHP] PHP eregi filtering problem

2003-12-06 Thread PurpleOnyx
Greetings all, I ran into a problem today and was hoping someone could provide an answer. I am fetching a web page, and attempting to parse certain variables from it. I've done this plenty of times in the past with no problem. The only difference this time is the file that I am parsing is much

Re: [PHP] eregi function?

2003-11-26 Thread Jason Wong
On Wednesday 26 November 2003 06:32, 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 {. If that is

[PHP] eregi function?

2003-11-25 Thread Jas
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 = mysql_fetch_array($sql))

RE: [PHP] eregi function?

2003-11-25 Thread Chris W. Parker
Jas mailto:[EMAIL PROTECTED] on Tuesday, November 25, 2003 2:32 PM said: 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

Re: [PHP] eregi function?

2003-11-25 Thread John W. Holmes
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... function

[PHP] eregi filter

2003-11-18 Thread Erin
Anyone have a good eregi filter for passwords? Regards R -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] eregi filter

2003-11-18 Thread Derek Ford
Erin wrote: Anyone have a good eregi filter for passwords? Regards R well, for one thing, don't use ereg. Use pcre, as it is faster. preg_match('/^[a-zA-Z0-9]{5,16}$/',$blah); that will validate a password containing only upper or lowercase letters and numbers, between 5 and 16

Re: [PHP] eregi filter

2003-11-18 Thread John W. Holmes
Erin wrote: Anyone have a good eregi filter for passwords? Yes. http://homepages.tesco.net/~J.deBoynePollard/FGA/questions-with-yes-or-no-answers.html -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals

Re: [PHP] eregi filter

2003-11-18 Thread John W. Holmes
Derek Ford wrote: Erin wrote: Anyone have a good eregi filter for passwords? well, for one thing, don't use ereg. Use pcre, as it is faster. preg_match('/^[a-zA-Z0-9]{5,16}$/',$blah); that will validate a password containing only upper or lowercase letters and numbers, between 5 and 16

Re: [PHP] eregi filter

2003-11-18 Thread John Nichel
John W. Holmes wrote: Derek Ford wrote: Erin wrote: Anyone have a good eregi filter for passwords? well, for one thing, don't use ereg. Use pcre, as it is faster. preg_match('/^[a-zA-Z0-9]{5,16}$/',$blah); that will validate a password containing only upper or lowercase letters and

[PHP] Eregi filtering..

2003-07-07 Thread Miranda, Joel Louie M
elseif (eregi(a-ZA-9, $v_tel_filter)) { echo '$v_tel_filter' Telephone Number Contains words; } else { im looking how to verify numbers alone and dash - can that be possible? I have tried using a-ZA-9 but did not work. any ideas? thanks, louie -- Thank you, Louie -- PHP General

RE: [PHP] Eregi filtering..

2003-07-07 Thread Ralph
, July 07, 2003 5:10 PM To: '[EMAIL PROTECTED]' Subject: [PHP] Eregi filtering.. elseif (eregi(a-ZA-9, $v_tel_filter)) { echo '$v_tel_filter' Telephone Number Contains words; } else { im looking how to verify numbers alone and dash - can that be possible? I have tried using a-ZA-9 but did

RE: [PHP] Eregi filtering..

2003-07-07 Thread Miranda, Joel Louie M
-Original Message- From: Ralph [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 8:20 AM To: Miranda, Joel Louie M; [EMAIL PROTECTED] Subject: RE: [PHP] Eregi filtering.. Here is one of doing this: if(strrpos($v_tel_filter,' ') 0 || strspn($v_tel_filter, 0123456789-) != strlen

Re: [PHP] Eregi filtering..

2003-07-07 Thread Mike Migurski
elseif (eregi(a-ZA-9, $v_tel_filter)) { echo '$v_tel_filter' Telephone Number Contains words; } else { im looking how to verify numbers alone and dash - can that be possible? I have tried using a-ZA-9 but did not work. /^[\-\d]+$/ should match a string of just digits and dashes.

[PHP] eregi problems

2002-07-04 Thread dan radom
I've got a form that's posted to a php page where I'm attempting to validate a field contains a valid email address. The eregi below seems to be totally ignored... if (eregi(^[a-z0-9\._-]+@[a-z0-9\._-]+$, $emp_email)) { echo centerplease enter a valid email address/center;

Re: [PHP] eregi problems

2002-07-04 Thread Justin French
Dan, I'll give you a little piece of advise that was given to me a little while back on this list: Go to http://www.killersoft.com/ and grab a copy of the validateEmailFormat program. QUOTE PHP4 translation of Jeffrey E.F. Friedl's definitive Email Regex Program from O'Reilly's Mastering

Re: [PHP] eregi problems

2002-07-04 Thread dan radom
My main cnocern at this point is that the eregi is being totally ignored. I just want to make sure the email address is in a valid format, not that it is a valid email address. I'll look at validEmailFormat as well, but I don't understand why it's not even being examined. dan * Justin

Re: [PHP] eregi problems

2002-07-04 Thread Marek Kilimajer
If the regexp matches, it is a valid email, so you need ! in front of it. dan radom wrote: I've got a form that's posted to a php page where I'm attempting to validate a field contains a valid email address. The eregi below seems to be totally ignored... if

[PHP] eregi not working

2002-06-07 Thread Robert Packer
Can someone tell me why this isn't working? To me it say open the file, read it, stick into a variable, close the file. Then search that variable (the file) and look for the eregi statements. Can someone tell me why this only gets the first instance of what I'm searching for? Thanks a bunch.

Re: [PHP] eregi not working

2002-06-07 Thread Jason Wong
On Saturday 08 June 2002 10:48, Robert Packer wrote: Can someone tell me why this isn't working? To me it say open the file, read it, stick into a variable, close the file. Then search that variable (the file) and look for the eregi statements. Can someone tell me why this only gets the first

[PHP] ?eregi?

2002-06-06 Thread Nikolai Jeliazkov
Can anybody help me!!! In my Windows2000 machine I use Apache 3.24 and PHP 4.0.6 and all is OK. But when I transfer my code to work machine (Apache/1.3.22 (Unix) (Red-Hat/Linux) mod_ssl/2.8.5 OpenSSL/0.9.6b DAV/1.0.2 PHP/4.0.6 mod_perl/1.26) the following script returns FALSE. ?php

Re: [PHP] eregi() against a binary file?

2002-05-29 Thread Miguel Cruz
According to the manual, the ereg functions are not binary safe. The superior-in-every-way preg functions are. Perhaps you could try using preg_grep instead. $result = preg_grep('/' . preg_quote($imagename) . '/', $file); You may find that strstr or something is even simpler. miguel On Tue,

[PHP] eregi() against a binary file?

2002-05-28 Thread Kevin Stone
I'm trying to match file names associated with a 3DS file (a 3DS file is a common 3D file format). The file is binary by nature but as you can clearly see in the dump below the filenames themselves are stored as plain text. So I should be able to do a simple eregi() on the file and discover if

Re: [PHP] eregi(mail)

2002-05-21 Thread Denis L. Menezes
.); exit; } Please help. Denis - Original Message - From: Steve Buehler [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED] Cc: PHP [EMAIL PROTECTED] Sent: Saturday, May 11, 2002 2:45 AM Subject: Re: [PHP] eregi(mail) Either Google is wrong (probably) or they are now allowing things like

Re: [PHP] eregi(mail)

2002-05-21 Thread Miguel Cruz
On Tue, 21 May 2002, Denis L. Menezes wrote: I use the following code, but it does not work. Is there something wrong? If (ereg('^[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.''.'[-!#$%\'*+\\/0-9=?A-Z^_`a -z{|}~]+\.'.'[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email_address)) One problem (syntax

Re: [PHP] eregi(mail)

2002-05-16 Thread Liam Gibbs
Thanks to all who helped out with the eregi(mail) stuff. I got my problem solved, and on top of that, there were some bugs that I found in the code. Thanks again to everyone. __ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience

[PHP] eregi(mail)

2002-05-10 Thread Liam Gibbs
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. __ Do You Yahoo!?

Re: [PHP] eregi(mail)

2002-05-10 Thread Analysis Solutions
Hi Liam: On Fri, May 10, 2002 at 09:48:58AM -0700, Liam Gibbs wrote: Does anyone have a decent eregi statement for validating e-mail addresses? eregi('^[a-z0-9_.=+-]+([a-z0-9-]+\.)+([a-z]{2,6})$', $Email); Enjoy, --Dan -- PHP classes that make web design easier SQL

Re: [PHP] eregi(mail)

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, 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. Well, it currently is an

Re: [PHP] eregi(mail)

2002-05-10 Thread Kevin Stone
it was useful in some tiny miniscule sort of way. :) -- Kevin Stone [EMAIL PROTECTED] - Original Message - From: Analysis Solutions [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 10:59 AM Subject: Re: [PHP] eregi(mail) Hi Liam: On Fri, May 10, 2002 at 09

Re: [PHP] eregi(mail)

2002-05-10 Thread Steve Buehler
function check_input($array){ global $HTTP_REFERER; $valid = 1; if(gettype($array)==array) { while (list($index, $subarray) = each($array) ) { if(ereg(required_, $index) (($subarray == ) || ($subarray == ))) {

Re: [PHP] eregi(mail)

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, Kevin Stone wrote: I had always been suspicious about email validators so I did a big long search on Google about standard address formats. It turns out that aside from the symbol emails have no standard format whatsoever. So ereg('', $email) is really the only

Re: [PHP] eregi(mail)

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, Steve Buehler wrote: if(ereg('^[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.''.'[-!#$%\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', If I'm reading it correctly, this will let invalid addresses through. The domain component (after the sign) can only

Re: [PHP] eregi(mail)

2002-05-10 Thread Analysis Solutions
Folks: On Fri, May 10, 2002 at 01:27:45PM -0500, Steve Buehler wrote: if(ereg('^[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.''.'[-!#$%\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $subarray)){ Those characters don't conform to the RFC.

Re: [PHP] eregi(mail)

2002-05-10 Thread Steve Buehler
: Re: [PHP] eregi(mail) Hi Liam: On Fri, May 10, 2002 at 09:48:58AM -0700, Liam Gibbs wrote: Does anyone have a decent eregi statement for validating e-mail addresses? eregi('^[a-z0-9_.=+-]+@([a-z0-9-]+\.)+([a-z]{2,6})$', $Email); Enjoy, --Dan -- PHP

Re: [PHP] eregi(mail)

2002-05-10 Thread Steve Buehler
To tell you the truth, I can't read it. Steve At 01:32 PM 5/10/2002, Miguel Cruz wrote: On Fri, 10 May 2002, Steve Buehler wrote: if(ereg('^[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.''.'[-!#$%\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', If I'm reading it correctly,

Re: [PHP] eregi(mail)

2002-05-10 Thread Kevin Stone
format is irrelevant. -Kevin - Original Message - From: Miguel Cruz [EMAIL PROTECTED] To: Kevin Stone [EMAIL PROTECTED] Cc: PHP-general [EMAIL PROTECTED] Sent: Friday, May 10, 2002 12:30 PM Subject: Re: [PHP] eregi(mail) On Fri, 10 May 2002, Kevin Stone wrote: I had always been suspicious

RE: [PHP] eregi(mail)

2002-05-10 Thread Nathan Cassano
This is what I have used. ? if(eregi(^[_.+a-z0-9-]+@[a-z0-9-]+(\.[a-z0-9-]+)*(\.([a-z]){2,4})\$, $email)){ echo Good Email!; } ? Here is an excellent article on Regular Expressions. Learning to Use Regular Expressions by Example http://www.phpbuilder.com/columns/dario19990616.php3

Re: [PHP] eregi(mail)

2002-05-10 Thread Miguel Cruz
On Fri, 10 May 2002, Kevin Stone wrote: As we all know ARPA is thet university network, funded by the government to build an information infrastructure that eventually became the internet we have today. But the standards for text messaging within the ARPA net have been added to over the

[PHP] eregi

2002-05-02 Thread Fredrik Arild Takle
Hi, I'm doing: eregi($start(.*)end, $rf, $my_var); And I want it to stop at the first presedence of $end, not the last (thats what this is doing). Any hints? Best Regards Fredrik A. Takle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] eregi

2002-05-02 Thread Miguel Cruz
On Thu, 2 May 2002, Fredrik Arild Takle wrote: eregi($start(.*)end, $rf, $my_var); And I want it to stop at the first presedence of $end, not the last (thats what this is doing). Try preg, which is faster and gives you more control (here the ? munificence operator).

Re: [PHP] eregi

2002-05-02 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Miguel Cruz) wrote: On Thu, 2 May 2002, Fredrik Arild Takle wrote: eregi($start(.*)end, $rf, $my_var); And I want it to stop at the first presedence of $end, not the last (thats what this is doing). Try preg, which is faster and

Re: [PHP] eregi

2002-05-02 Thread Miguel Cruz
On Thu, 2 May 2002, CC Zona wrote: [EMAIL PROTECTED] (Miguel Cruz) wrote: preg_match(/{$start}(.*?)end/, $rf, my_var); Leave out the braces. Don't they get removed by the parser's handling of double-quoted strings long before anything makes it to preg_match()? I almost always use the

Re: [PHP] eregi

2002-05-02 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Miguel Cruz) wrote: On Thu, 2 May 2002, CC Zona wrote: [EMAIL PROTECTED] (Miguel Cruz) wrote: preg_match(/{$start}(.*?)end/, $rf, my_var); Leave out the braces. Don't they get removed by the parser's handling of double-quoted strings

Re: [PHP] eregi() problem

2002-04-22 Thread Miguel Cruz
On Mon, 22 Apr 2002, Gregor Jaksa wrote: if (!eregi(^[[:alpha:]]$, $HTTP_POST_VARS[vpis_ime])) echo wrong char; why does this always return wrong char no matter what value is in vpis_ime ... i tried blah, 242234 bla242h .. every single time i get wrong char. im using PHP 4.1.2 The only

[PHP] eregi() problem

2002-04-21 Thread Gregor Jaksa
if (!eregi(^[[:alpha:]]$, $HTTP_POST_VARS[vpis_ime])) echo wrong char; why does this always return wrong char no matter what value is in vpis_ime ... i tried blah, 242234 bla242h .. every single time i get wrong char. im using PHP 4.1.2 basicly is what i want is to check string if it contains

Re: [PHP] eregi() problem

2002-04-21 Thread Danny Shepherd
PROTECTED] Sent: Monday, April 22, 2002 1:04 AM Subject: [PHP] eregi() problem if (!eregi(^[[:alpha:]]$, $HTTP_POST_VARS[vpis_ime])) echo wrong char; why does this always return wrong char no matter what value is in vpis_ime ... i tried blah, 242234 bla242h .. every single time i get wrong

Re: [PHP] eregi() problems...

2002-04-16 Thread Michael Virnstein
eregi('_[0-9]{4}.jpg$', $file_name) should be eregi('_[0-9]{4}\.jpg$', $file_name) . is a spcial character(means every character) and has to be backslashed if you want it's normal meaning Jas [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I must be

Re: [PHP] eregi() problems...

2002-04-16 Thread Michael Virnstein
the rest seems ok to me, if you search for files with e.g hello_.jpg as name Michael Virnstein [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... eregi('_[0-9]{4}.jpg$', $file_name) should be eregi('_[0-9]{4}\.jpg$', $file_name) . is a spcial

[PHP] eregi() problems...

2002-04-15 Thread jas
// second selection for main image on main page $dir_name = /path/to/images/directory/; $dir = opendir($dir_name); $file_lost .= pFORM METHOD=\post\ ACTION=\done.php3\ NAME=\ad01\ SELECT NAME=\images\; while ($file_names = readdir($dir)) { if ($file_names != . $file_names !=..

Re: [PHP] eregi() problems...

2002-04-15 Thread Robert Cummings
jas wrote: // second selection for main image on main page $dir_name = /path/to/images/directory/; $dir = opendir($dir_name); $file_lost .= pFORM METHOD=\post\ ACTION=\done.php3\ NAME=\ad01\ SELECT NAME=\images\; while ($file_names = readdir($dir)) { if ($file_names != . $file_names

Re: [PHP] eregi() problems...

2002-04-15 Thread jas
I must be doing something wrong, for that solution did not work. Robert Cummings [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... jas wrote: // second selection for main image on main page $dir_name = /path/to/images/directory/; $dir = opendir($dir_name);

[PHP] eregi()

2002-03-19 Thread Vlad Kulchitski
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 correctly Vlad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] eregi()

2002-03-19 Thread Rénald CASAGRAUDE
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 correctly $pattern = [a-zA-Z0-9_\-]+; this is meaning : One word containing a-z or A-Z or 0-9 or _ or - with

[PHP] eregi, ereg or smth. else???

2002-02-26 Thread Kristjan Kanarik
I've never had time to get into those ereg, eregi etc. functions, and now I am affraid I probably need to use them. Here is the problem I need to solve: I have a string (lead of an article), about 200-250 characters long. And then I do have a search query - variable $q Now, what I'd like to do

Re: [PHP] eregi, ereg or smth. else???

2002-02-26 Thread bvr
You don't need regular expressions for this. To match case insensitive, just upper or lower case both strings and use strpos() to find an occurence. Now you allready have the position of the match it'll be easy to get that part of the string. I suggest you substr() it into 3 parts and put the

Re: [PHP] eregi

2002-02-08 Thread DL Neil
Hello John I'm using eregi to print out parts of a text file, and I was just wondering how you get the code to print out a newline as it appears in the file. Not quite sure what eregi has to do with it - perhaps I'm missing something. Would the nl2br function help? =dn -- PHP General

[PHP] eregi and alfa numeric characters.

2002-01-11 Thread Sait Karalar
Hi all, I want a regular expression process such that, no characters except for the followings will not be allowed. 0-9 a-z A-Z ~ @ # $ % ( ) _ - + = [ ] { } ? I create a web site with membership. I have a problem. Some body uses

Re: [PHP] eregi

2001-10-02 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Mike Cullerton) wrote: eregi(^[a-z0-9_\-]+$,$string) notice that i had to escape the dash with a backslash Are you sure? 'Cuz AFAIK, escaping shouldn't be necessary on a hyphen which is the last char (or, IIRC, the first) of a character

Re: [PHP] eregi

2001-10-02 Thread mike cullerton
on 10/2/01 8:51 AM, CC Zona at [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Mike Cullerton) wrote: eregi(^[a-z0-9_\-]+$,$string) notice that i had to escape the dash with a backslash Are you sure? 'Cuz AFAIK, escaping shouldn't be necessary on a hyphen

[PHP] eregi

2001-10-01 Thread Tim Ballantine
Hello, Could anyone tell me how to eregi a word, to see if it only contains either numbers, letters, the _ and the -, so that any other symbol with call it invalid. For example, theres the word expressio_n that will be valid, but the word express%^$-n will be invalid. Thankyou, Tim -- PHP

Re: [PHP] eregi

2001-10-01 Thread Rasmus Lerdorf
See php.net/strcspn On Mon, 1 Oct 2001, Tim Ballantine wrote: Hello, Could anyone tell me how to eregi a word, to see if it only contains either numbers, letters, the _ and the -, so that any other symbol with call it invalid. For example, theres the word expressio_n that will be valid,

Re: [PHP] eregi

2001-10-01 Thread Tim Ballantine
Is there anything which doesnt use length? And something like eregi, because it would be infeasible to list all of the symbols that a user could use, to compare a string by. Tim Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... See php.net/strcspn

Re: [PHP] eregi

2001-10-01 Thread Rasmus Lerdorf
Huh? You better read that documentation page again. You only need to list the illegal symbols. And what do you mean by length? -Rasmus On Mon, 1 Oct 2001, Tim Ballantine wrote: Is there anything which doesnt use length? And something like eregi, because it would be infeasible to list all

Re: [PHP] eregi

2001-10-01 Thread Tim Ballantine
Returns the length of the initial segment of str1 which does not contain any of the characters in str2. I realise that i could see if this matches with the length of the entire word, and is there a way to get it to compare the word by the legal characters, because the amount of illegal symbols,

Re: [PHP] eregi

2001-10-01 Thread Rasmus Lerdorf
Well, either you need to know the valid chars or the invalid ones. Make up your mind and use strspn() or strcspn() appropriately. -Rasmus On Mon, 1 Oct 2001, Tim Ballantine wrote: Returns the length of the initial segment of str1 which does not contain any of the characters in str2. I

Re: [PHP] eregi

2001-10-01 Thread Tim Ballantine
Thankyou... I should have made it clearer that I did want to use only the legal characters to compare the string by. Tim Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Well, either you need to know the valid chars or the invalid ones. Make up

Re: [PHP] eregi

2001-10-01 Thread mike cullerton
i realize a solution using strspn/strcspn was offered, but you asked for eregi :) anyway, i use ereg, but i think this should work eregi(^[a-z0-9_\-]+$,$string) notice that i had to escape the dash with a backslash the plus sign forces atleast one character. you can use {x,y} in place of the

Re: [PHP] Eregi for Image

2001-08-27 Thread Daniel Rezny
Hello Jeff, Sunday, August 26, 2001, 9:17:45 PM, you wrote: JO I want to check if an uploaded file is an image. This isn't working. JO Could anyone help me out? JO if (!eregi(\\.gif$, $img1_name) || JO !eregi(\\.jpg$, $img1_name) || JO !eregi(\\.jpeg$, $img1_name)) { JO error

[PHP] Eregi for Image

2001-08-26 Thread Jeff Oien
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 } Jeff Oien -- PHP General Mailing List (http://www.php.net/) To

[PHP] eregi replace help

2001-07-06 Thread Richard van Leeuwen
I want to delete some lines original: a href=http://www.example.com/1.html; ABCD/a gt; a href=www.example.com/title.html#1234Football/a a href=http://www.example.com/2.html; BCDE/a gt; a href=www.example.com/title.html#2345Tennis/a a href=http://www.example.com/3.html; CDEF/a gt; a

RE: [PHP] EREGI -- Help

2001-05-16 Thread Johnson, Kirk
Give this a try: if(!ereg(^([0-9]{5}([-]{1}[0-9]{4})?)$,$data)) { Kirk -Original Message- From: Jason Caldwell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 8:16 PM To: [EMAIL PROTECTED] Subject: [PHP] EREGI -- Help I'm just trying to create a eregi expression

[PHP] EREGI -- Help

2001-05-15 Thread Jason Caldwell
I'm just trying to create a eregi expression that will evaluate a zip code... and I cannot get it to work... can anyone assist me with this? -- also, is there a site that shows regular expression examples for checking fields like, zip codes, phone numbers, etc...

[PHP] eregi not working???

2001-03-20 Thread Clayton Dukes
I have a script that looks for title tags, but it doesn't seem to be picking up the titles, can anyone tell me why? Almost all of theweb pages look like: ?if(!isset($mainfile)) { include("mainfile.php"); }if(!isset($headers_sent)) { include("header.php"); }?!DOCTYPE HTML PUBLIC

  1   2   >