in reply to XML cleanup - regex or ?
Here's one approach, if you want to do it by hand.
foreach my $cat (@cats) { if ($cat !~ m/meow=.+?/i) { # do action here } }
The process should work. However, if you have hundreds of tag/attribute combinations, you probably wouldn't want to hard code those combinations. Instead, you might prefer to do a subroutine and pass in the tag and attribute combo.
Hope this helps.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML cleanup - regex or ?
by ethrbunny (Monk) on Sep 21, 2010 at 15:11 UTC | |
by dasgar (Priest) on Sep 21, 2010 at 16:10 UTC |