in reply to regex to extract text

See perlre section Modifiers and in particular the s modifier.