#44800 [Opn->Csd]: Returns empty value

From: Date: Tue, 22 Apr 2008 18:54:19 +0000
Subject: #44800 [Opn->Csd]: Returns empty value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-124429@lists.php.net to get a copy of this message
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

« previous php.bugs (#124429) next »