I have this regex here;
\\[sometag\\](.*)\\[/sometag\\]
Which is supposed to catch text surrounded by the [sometag] tag. It wo
[sometag]
At the start, use a dotall modifier (?s) to make dot to match also newline characters.
(?s)
(?s)\[sometag\](.*?)\[\/sometag\]
DEMO
If modifying of dot's mode is inadmissible for some reasons, you may take that:
[sometag](.|\n)+?[/sometag]