I'm having an issue splitting up two parts of a text file with regex. Basically, a name of a class will appear, but then the room number will come one white space after it. I am not guaranteed the name of the room, otherwise I would split on that.
To illustrate, this splits perfectly fine:
WEB SITE DEVELOPMENT II NKM 104
It will split because of the white spaces, so in my string[] array it looks like:
0 - WEB SITE DEVELOPMENT II
1 - KNM 104
Which is what I need. The problem lies in entries such as these:
PERSONAL COMPUTER APPLICATI NKM 106
PORTFOLIO DES & PROF PRACTI LCN 104
Which will show up as:
0 - PERSONAL COMPUTER APPLICATI NKM 104
1 - PORTFOLIO DES & PROF PRACTI LCN 104
When I need:
0 - PERSONAL COMPUTER APPLICATI
1 - KNM 104
2 - PORTFOLIO DES & PROF PRACTI
3 - LCN 104
Any ideas on where to start on some regex in a situation like this? I know I am guaranteed the room number will always be the "XYZ 012" form, but the problem is it comes after the name of the class. It was before, I could easily just split on that. Any help is appreciated.