Nice work comparing these approaches (++).
If anyone wants the hippo version to work even in the OP-unspecified case, all that is required is to change the return statment to
return $fname || $sname;
which completes the test set for that approach.
In reply to Re: OT: Test framework (Re: RegExp, grabbing first name)
by hippo
in thread RegExp, grabbing first name
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |