I would like to parse a all occurrence into an Array. Is it possible to do this? The below Is the code I have.
#!/usr/bin/perl my $str = "<item><i>headline 1</i></item> < item><i>headline2</i></item>"; my @x =~ /<(.+?)>.+<\/\1>/ for $str;
Is there a way to get all 'item' into array?
Thanks.In reply to Parsing with RegEx into Array by mr_p
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |