![]() |
Why does this preg_match fail?
Can someone plase explain why this statement fails?
PHP Code:
Quote:
PHP Code:
|
Looks like your missing a dot.
In the first statement, (*) should be, (.*) |
Thanks. Unfortunately, that was just a typo made while editing the post. The original code already had it in there. I did find that using quotes instead of apostrophes made a difference though. So this now works:
PHP Code:
So the next step is to read that in from the database so it works without manual edits. This is what I am trying to do (the top line is simulating what would be read from the database): PHP Code:
|
If I take out the quotes around the condition and don't escape the quotes inside the condition,
PHP Code:
|
That did it. Thanks for taking the time to help. It is much appreciated. :)
|
| All times are GMT. The time now is 10:05 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0