I have a document of the form:
*##:##* text
*##:##* more text
and here is some more
*##:##* even more text
where the # is any number
I’m trying to write a regex to find
*##:##* text
and
*##:##* more text
and here is some more
and
*##:##* even more text
My current regex looks like:
'\*([0-9][0-9]:[0-9][0-9])\*(.+?)(?=(\*([0-9][0-9]:[0-9][0-9])\*|\Z))'
however it generates spurious results of just the number format and some of the text. What would the correct regex look like?
The key thing is that you have to explicitly add the new line character if you want your regex to be able to match content dispatched over multiple lines.