Hi,
I am writing a script to search through a ASCII file for a pattern <BOXIND NUM="x" ID="BX1.xx.xxx"/> and push the contents of the ID to a array.
while ($file =~ /<BOXIND NUM=\"(.+)\" ID=\"(.*?)\"\/>/g) {push(@ind,$2);}
@ind is the array to which I need to add the ID values. I there are two BOXIND elements in a same line, this regex returns only the last found element in that line. Can someone let me know what went wrong in this pattern?
Sriram
In reply to Using a regex search pattern by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |