At the start, use a dotall modifier (?s)
to make dot to match also newline characters.
(?s)\[sometag\](.*?)\[\/sometag\]
DEMO
If modifying of dot's mode is inadmissible for some reasons, you may take that:
[sometag](.|\n)+?[/sometag]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With