However, you'll probably need to know some more details about the input: can you rely on getting the params always in lowercase, do you get one meta_parameter per input line, etc.#!/usr/bin/perl use strict; use warnings; while (<DATA>) { my $id; if (m/type="stored-procedure"/) { $id = $1 if m/id="([^"]+)"/; } print "ID: $id\n" if defined $id; } __DATA__ <meta-parameter type="stored-procedure" id="rep_vfnz_gsm_bss_tch_netwo +rk_report_spr">\ <meta-parameter id="rep_vnz_gprs_quality_report_daily_spr" type="store +d-procedure">\ <meta-parameter type="stored-procedure" id="rep_vfnz_gsm_nss_benchmark +ing_report_spr">\ <meta-parameter id="rep_vnz_cchnwpossumreport2_spr" type="stored-proce +dure">\ <meta-parameter id="rep_vfnz_gsm_bss_tch_network_report_spr" type="sto +red-procedure">
In reply to Re: regex to match the following
by Krambambuli
in thread regex to match the following
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |