Btw, on another note:
$regex always returns a digit in range 0-, in other words, you don\'t need to check for > 0.
In an if statement, when checking a value like: if (value)
the condition evaluates to $true when the value is not 0, not $false, and not $null. In the same way, the if statement returns $false, if the value was either 0, $false, or $null.
Since $regex is always a digit, we can already rule out the $true and $false, leaving us with only the digit 0 to make the if condition false.
Therefore \"if ($regex([name],value,))\" is sufficient.