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 rege
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:
[a-z0-9\!
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 ) {
>
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
>
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\!\
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 i
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 sta
Not sure, but I don't think you should escape all those characters inside of
the character class. I might be wrong. However, that might not have anything
to do with the error. But I do think you need to escape the / in the end...
And the - you should have in the beginning of the character class, ot
8 matches
Mail list logo