in reply to Regex problem II
That's not a regexp question, that's a Text::CSV (or Text::CSV_XS, or my personal favourite, DBD::CSV) question.
Once you have your field split, it's much easier to match. Or, using DBD::CSV, you could just say "SELECT col2 WHERE col1 = 'Indicator'" (substitute in the correct column names), and then you could use a much simpler regexp to pull out the info you want from there. (The quotes, if any, would already be stripped by this point.):
But I'm an SQL nut.if ($field1 =~ /^(.*?)(\([^)]*\))$/) { print OUTFILE_B "$1\t$2\t"; }
|
|---|