Add support for filtering text by "length" <= >= < >
This commit is contained in:
parent
006067e851
commit
37313a4e9d
7
base.php
7
base.php
|
@ -742,6 +742,13 @@ function matches_comparing_expression($expr, $o_text, $debug=false) {
|
|||
echo '<br>';
|
||||
}
|
||||
break;
|
||||
case 'len':
|
||||
case 'length':
|
||||
case 'size':
|
||||
$bool = false;
|
||||
if (preg_match('/^(\<|\>)\=?\s*\d+$/', $content))
|
||||
eval('$bool = strlen($o_text) '.$content.';');
|
||||
break;
|
||||
|
||||
}
|
||||
$result = str_replace($t, $bool ? 'true' : 'false', $result);
|
||||
|
|
Loading…
Reference in New Issue