Awesome! Thanks for the answer! This seems to work fine. I had to modify your suggested regex a bit to handle matching both the item and the catalog number, since that was part of my original problem. I may not have made that very clear above.
My regex looks like this, and it's acting on the whole $block variable instead of acting on just the first line of each block.
m/ELEMENT\s(.+?)\s\(Item := \"\Q$item\E\".+?CatalogNumber := \"\Q$catNum\E/sThanks again for the quick help!
In reply to Re^2: can I make my regexp match first pattern instead of last?
by kleucht
in thread can I make my regex match first pattern instead of last?
by kleucht
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |