Original Post
Hi Guys. I'm making a program that needs to take a text file as input and split it up into strings. However, it is a complicated (and unchangeable) format. The format is as such. What I need to do is extract a string from the '.1' to the next '.', including the '.1', not including the next '.'. At any time there may be a number after the dot, there may not be. I then need from the '.' to the '.2' etc etc. I've started a previous incarnation of this thing in VB.NET, using the regex string "\.\d\s.*?(?=\.\d)|\.\d.*?$" however that does not allow for the little fellow in the middle there. The closest I could come up with for my situation was "\r\n\r\n\.\d[a-zA-Z0-9*]" however that will not work at all, because that will stop when it reaches some punctuation, and I need it to pass over unless that punctuation is a period on a line by itself OR has a number after it. It's very complicated and I had the last regex expression made for me, so I have no idea. Any help would be much appreciated. Cheers Jacob.
One line of text here.
.i Perhaps some text here, but it is optional.
.1
Here is some more text, possibly with punctuation.
And it goes on like this for several lines.
.
Then we have a little non-numbered one here.
.2
And then here!