For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > July 2004 > trouble with preg_match()









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author trouble with preg_match()
Ike

2004-07-26, 3:56 pm

Can anyone tell me why the following evaluates to false

preg_match("/^.*X$/",$composited_rod_end_head_p)

when

$composited_rod_end_head_p=="1X";

Thanks, Ike


Andy Hassall

2004-07-26, 8:55 pm

On Mon, 26 Jul 2004 16:49:55 GMT, "Ike" <rxv@hotmail.com> wrote:

>Can anyone tell me why the following evaluates to false
>
>preg_match("/^.*X$/",$composited_rod_end_head_p)
>
>when
>
>$composited_rod_end_head_p=="1X";


It doesn't here; can you demonstrate how you're determining it does in your
case?

--
Andy Hassall <andy@andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Ike

2004-07-26, 8:56 pm

Ah yes....I see.....I have a problem further down in my code that is making
the result of this appear (falsely!) to be false. Thanks for checking Andy.

"Andy Hassall" <andy@andyh.co.uk> wrote in message
news:9ksag01ho5asm8h4stlginbluplm4kqupm@
4ax.com...
> On Mon, 26 Jul 2004 16:49:55 GMT, "Ike" <rxv@hotmail.com> wrote:
>
>
> It doesn't here; can you demonstrate how you're determining it does in

your
> case?
>
> --
> Andy Hassall <andy@andyh.co.uk> / Space: disk usage analysis tool
> http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com