my $regex = '
([.\w\s]*?)()?([.\s\w]*?)
'; #### Text 1 found text tex text more text Text 2 found text text text more text