Re: Warning: ereg(): REG_BADBR
- From: "millw0rm@xxxxxxxxx" <millw0rm@xxxxxxxxx>
- Date: 28 Apr 2006 08:46:19 -0700
wow that kool!!!
thnx alot!
Kimmo Laine wrote:
<millw0rm@xxxxxxxxx> wrote in message
news:1146208077.913936.287620@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
why i m getting error here???
Warning: ereg(): REG_BADBR
code:
if(!ereg("^(.){15,400}$",$string)) {
$errormsg[1] = "- Must be more then 15 Characters & less then 400
Characters";
}
Want to Achive:
$string is a textarea, i want the user to input atleast 15 characters
and shldnt exceed more then 400 characters!
Don't know, but why would you need to use a regexp for so trivial case?
Remember the KISS rule: Keep it simple, stupid.
if( ($len = strlen($string)) < 15 || $len > 400) {
$errormsg[1] = "- Must be more then 15 Characters & less then 400
Characters";
}
--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
spam@xxxxxxxxxxxxx | Gedoon-S @ IRCnet | rot13(xvzzb@xxxxxxxxxxxxx)
.
- References:
- Warning: ereg(): REG_BADBR
- From: millw0rm@xxxxxxxxx
- Re: Warning: ereg(): REG_BADBR
- From: Kimmo Laine
- Warning: ereg(): REG_BADBR
- Prev by Date: Re: I open a PHP file with FF and its content is printed
- Next by Date: Re: Problems Creating the Code to Open Images Within a Template PHP Page
- Previous by thread: Re: Warning: ereg(): REG_BADBR
- Next by thread: Re: Warning: ereg(): REG_BADBR
- Index(es):