in reply to Regex question
UPDATE: UGLIER than I realized; see Roy Johnson's below
OUTPUT:use strict; use warnings; use vars qw ($foo $bar @bar); $foo = 'var-a numeric (10,0) = NULL, var-b char (10) = NULL'; @bar = split /([^(,)].*,)+/, $foo; # [^(,)]... happens to work here, but is NOT a generally appli +cable approach! foreach $bar(@bar) { print "$bar\n"; }
var-a numeric (10,0) = NULL, var-b char (10) = NULL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex question
by Roy Johnson (Monsignor) on Oct 20, 2005 at 18:06 UTC |