ID:               44800
 User updated by:  citricacid at tlen dot pl
 Reported By:      citricacid at tlen dot pl
-Status:           Open
+Status:           Closed
 Bug Type:         PCRE related
 Operating System: Ubuntu 8.04 beta
 PHP Version:      5.2.5
 New Comment:

I was wrong. Sorry. Everything is fine. That value is invisible because
it contains hidden html tag. Stupid me.


Previous Comments:
------------------------------------------------------------------------

[2008-04-22 18:43:45] citricacid at tlen dot pl

Description:
------------
I try to preg_grep an array which contains some html strings. Each line
is an array element.
If the expression string matches searched string from the beginnig to
the end then everything is fine. If the expression string matches a
substring then an empty value is returned.

Reproduce code:
---------------
Array - $templateArray:
[9]     <textarea name="senddata">
[10]    {ccms:textile}
[11]    </textarea><br />
[12]    <input type="hidden" value="{ccms:idmenu}" name="ccmsid"
id="ccmsid">

Code:
$cml = preg_grep("/\{ccms:.+\}/", $templateArray)
echo "<pre>";
print_r($cml);
echo "</pre>";

Expected result:
----------------
Array
(
    [10] => {ccms:textile}
    [12] => <input type="hidden" value="{ccms:idmenu}" name="ccmsid"
id="ccmsid">
)


Actual result:
--------------
Array
(
    [10] => {ccms:textile}
    [12] => 
)



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44800&edit=1

Reply via email to