# makeregexb - turn a list of words into a regex that can be used to hunt for them
# in a list, a string, or files

package main;

use strict;
use MakeRegex;

my @list= qw(arm back leg elbow ear eye chin cheek knee head hip tooth teeth lips mouth hair);
my($regex) = MakeRegex::make_regex(@list);
print "regex: $regex\n";

my $l;
foreach (@list) {
  print "$_:";
  if (/$regex/) {
    print "YES\n";
  } else {
    print "NO\n";
  }  
}
  

    Source: geocities.com/soho/square/Square/3472

               ( geocities.com/soho/square/Square)                   ( geocities.com/soho/square)                   ( geocities.com/soho)