src/Mouf/Utils/I18n/Fine/Controllers/EditLabelController.php
private function regex_search_array($array, $regex) {
		$return = array();
		foreach ($array as $key => $item) {
	 		if(is_array($item)) {
	 			$tmp = $this->regex_search_array($item, $regex);
	 			if($tmp)
	 				$return[$key] = $tmp;
	 		} elseif(!is_object($item)) {
	 			//if (preg_match("/^.*".$regex.".*$/", $this->stripAccents($item))) {
	 			if (preg_match("/".$regex."/i", $this->stripAccents($item))) {
	                $return[$key] = $item;
	           	}
	 		}
		}
	 	
	    return $return;
	}
private function regex_search_array($array, $regex) {
		$return = array();
		foreach ($array as $key => $item) {
	 		if(is_array($item)) {
	 			$tmp = $this->regex_search_array($item, $regex);
	 			if($tmp)
	 				$return[$key] = $tmp;
	 		} elseif(!is_object($item)) {
	 			//if (preg_match("/^.*".$regex.".*$/", $this->stripAccents($item))) {
	 			if (preg_match("/".$regex."/i", $this->stripAccents($item))) {
	                $return[$key] = $item;
	           	}
	 		}
		}
	 	
	    return $return;
	}
private function regex_search_array ( $ array , $ regex ) { $ return = array ( ) ; foreach ( $ array as $ key => $ item ) { if ( is_array ( $ item ) ) { $ tmp = $ this -> regex_search_array ( $ item , $ regex ) ; if ( $ tmp ) $ return [ $ key ] = $ tmp ; } elseif ( ! is_object ( $ item ) ) { //if (preg_match("/^.*".$regex.".*$/", $this->stripAccents($item))) { if ( preg_match ( "/" . $ regex . "/i" , $ this -> stripAccents ( $ item ) ) ) { $ return [ $ key ] = $ item ; } } } return $ return ; }
Search the regex in all the array. Return an array with all result

Enter description here ...
@param array $array
@param string $regex
@return array
Search the regex in all the array . Return an array with all result