[comp.lang.perl] another regular expression question

shani@TAURUS.BITNET (06/07/90)

First, I would like to thank all those who answered my prior question, but maybe
you could help me on another thing: I need an algorithm that will compare a
regular expression to a string and will return an array, consisting of the
sections of the string that where matched by wildcards. for instance, if the
algorithm recievs the rexp "\wcp\s.*\s.*\w" and the string "cp a.a b.b",
it will return the array (a.a,b.b) (note that the \w's and \s's are not
considered wildcards, although "\s*" would have).

Thanks in advance,

O.S.

BTW: The whole thing is a part of the plsh I'm writing.