in reply to Regex substitution
Taking one wild guess, which could be totally off, because I can think of about three or four things you might mean, let's say you want to grab all the items that are comma-delimited inside the parens:
$string = "blah blah (name 1, name 2, name 3 and name 4), blah blah (n +ame 1, name 2, name 3 and name 4)"; @items = map { split /,\*/ } $string =~ /\((.*?)\)/g;
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Regex substitution
by swiftone (Curate) on Sep 11, 2000 at 08:26 UTC |