<?php
$one 
= array("chello","hello","jello","fellow","fello","mello","mello-yellow");
$two = array("bal","ball","balloon");
$three = array("worda_1234","word_1234","word_123","word","wordb_7689");
$four = array("12345-1234","12345","-1234","56789-1234");
$five = array("pot","bot","boot","boooooooooooooooooot","booger","argly");
$six = array("abcdefg","hijklmn","opqrstu","abcdexz","abc");
$seven = array("246_hello_world","123_hello_there","015_chess_rules");
$eight = array("<html>","<div>","<span class='unix'>");
$nine = array("Mr Beni hana","Ms Rosie odonnel","Frank burns""Ms F Fitzgerald","Mr Hooper");
$ten = array("#123456""#888""#4512");

$sol_one "";
$sol_two "";
$sol_three "";
$sol_four "";
$sol_five "";
$sol_six "";
$sol_seven "";
$sol_eight "";
$sol_nine "";
$sol_ten "";

function 
find_match($pattern$list) { 
    foreach (
$list as $item) {
        if (
preg_match($pattern$item)) {
            print(
$pattern " matches " $item "\n");
        }
    }
    return;
}

find_match($sol_one$one);
find_match($sol_two$two);
find_match($sol_three$three);
find_match($sol_four$four);
find_match($sol_five$five);
find_match($sol_six$six);
find_match($sol_seven$seven);
find_match($sol_eight$eight);
find_match($sol_nine$nine);
find_match($sol_ten$ten);