FiberOPtics commented on a Page, Basic $regex example  -  Jan 04, 2006

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.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.