jn wrote:
> The limitation of the code you presented is that it ignores some of the
context and partial-description issues.

It would seem that a 'RegExpParse-er would be a good idea. Then bobr's PERL
function:

sub userInList { my ($user, $userlist) = @_;
  $user =~ s/$userlist//;  # a perfect match erases all chars
  return ( $user eq "" ) ? 1 : 0;
}

would look this in REBOL:

userInList: func [user [string!] userList [block!]] [
    RegExpParse userList user
    ]

RegExpParse would work by first reworking the PERL RegExp, 'userList, into
parse rules, then use those parse rules with 'parse to check 'user.

That would seem the most elegant way to do it.

Andrew Martin
Thinking about it all night...
ICQ: 26227169
[EMAIL PROTECTED]
http://members.xoom.com/AndrewMartin/
-><-

Reply via email to