in reply to Re^2: Pattern Matching
in thread Pattern Matching
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;
|
|---|