>>>>> "Eric" == Eric Goldhagen <[EMAIL PROTECTED]> writes:

Eric> Randal,
Eric> thanks, but it still does not work for me.

Eric> I tried
Eric> [% matches = fullstory.match("(\\w+ $s_word \\w+)") %]

Eric> and

Eric> [% matches = fullstory.match("(\\w+$s_word\\w+)") %]

Eric> any other ideas?

    $ tpage
    [%
      fullstory = "kermit the frog";
      s_word = "the";
      matches = fullstory.match("(\\w+ $s_word \\w+)");
      FOREACH m = matches;
        "one match is <"; m; ">\n";
      END;
    %]
    ^D
    one match is <kermit the frog>
    $

Looks good to me.  You have only one paren set, so you get
back only one match.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


Reply via email to