I'm somewhat at ease with regex, but not with grep particularly, and can't figure out why the following regex returns nothing:
wget -qO- 'http://www.acme.com/index.html' | grep -iPo '(?s)(^<div class="titlebar">.+?<div class="colleft">)'
I prepended (?s) because the catch-all ".+?" includes carriage-returns (either CRLF, CR, or LF, depending on how the text was saved).
Any idea why it doesn't work as expected?
Thank you.