Note non-greedy match.$_ = 'some random text<B><P ALIGN=CENTER>My Text I want to grab 1</B>< +/FONT><p>some of stuff<B><P ALIGN=CENTER>My Text I want to grab 2</B> +</FONT> some other random text<B><P ALIGN=CENTER>My Text I want to gr +ab 3</B></FONT>'; my @wants = /<B><P ALIGN\=CENTER>(.+?)<\/B><\/FONT>/g; print "$_\n" for @wants;
In reply to Re^3: Pattern Matching
by Roy Johnson
in thread Pattern Matching
by webchalkboard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |