Re: [PHP] preg_match() returns false but no documentation why
- From: farrishj@xxxxxxxxx ("Jared Farrish")
- Date: Wed, 30 May 2007 15:06:00 -0500
On 5/30/07, Richard Lynch <ceo@xxxxxxxxx> wrote:
On Wed, May 30, 2007 12:33 pm, Jared Farrish wrote:
>
> preg_match("^ldap(s)?://[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$",$this->server)
You are missing the start/end delimiters is your first problem...
Which ones? I've got the starter "^" and the closer "$", so what else am I
missing?
would a regex operation return false?
It would return false if your string doesn't match the expression.
The manual claims it will return a 0 signaling "0 matches found." And then,
under "Return Values," it's says very quickly:
"*preg_match()* returns *FALSE* if an error occurred."
If it's not returning ANYTHING I'm assuming it's faulting, but the calling
the error function returns 0 (kind've ironic, really...).
--
Jared Farrish
Intermediate Web Developer
Denton, Tx
Abraham Maslow: "If the only tool you have is a hammer, you tend to see
every problem as a nail." $$
- Follow-Ups:
- Re: [PHP] preg_match() returns false but no documentation why
- From: "Richard Lynch"
- Re: [PHP] preg_match() returns false but no documentation why
- From: Stut
- Re: [PHP] preg_match() returns false but no documentation why
- References:
- preg_match() returns false but no documentation why
- From: "Jared Farrish"
- Re: [PHP] preg_match() returns false but no documentation why
- From: "Richard Lynch"
- preg_match() returns false but no documentation why
- Prev by Date: Re: [PHP] using mysql_escape_string with implode() !!
- Next by Date: Re: [PHP] preg_match() returns false but no documentation why
- Previous by thread: Re: [PHP] preg_match() returns false but no documentation why
- Next by thread: Re: [PHP] preg_match() returns false but no documentation why
- Index(es):
Relevant Pages
|