ok i think i found one of my problems. Since the data i receive could run over into another line, what i have done in order to get all matches possible i have cleaned the message into one long string. So instead of the message being
251824 08/380 ZZZ THIS IS WORTHLESS TEXT
0808251645-0808251830
251824 08/381 ZZZ NOT WORTH ANYTHING
0808251645-0808251830
181225 08/027 ZZZ DATA CRITICAL 305 M RADIUS AT 372419N/1154323W
Its actually
251824 08/380 ZZZ THIS IS WORTHLESS TEXT 0808251645-0808251830 251824 08/381 ZZZ NOT WORTH ANYTHING 0808251645-0808251830 181225 08/027 ZZZ DATA CRITICAL 305 M RADIUS AT 372419N/1154323W
Now if I use that regexp then it returns the only match as
08/380 ZZZ THIS IS WORTHLESS TEXT 0808251645-0808251830 251824 08/381 ZZZ NOT WORTH ANYTHING 0808251645-0808251830 181225 08/027 ZZZ DATA CRITICAL 305 M RADIUS AT 372419N/1154323W
So here is my question...am i doing the right thing by cleaning the string first (take out unreadable characters, line feeds, and making multiple spaces as single)? or is there a better way to do it directly with the untouched data. Sorry about the confusion as I forgot that in between reading the message and sending it to the parser i did the cleaning but the message could come across as
181225 08/027 ZZZ DATA CRITICAL 305 M RADIUS
AT 372419N/1154323W
or
181225 08/027 ZZZ DATA CRITICAL 305 M RADIUS
AT 372419N/1154323W
The extra space at the end and the beginning of the line is either accidentally put there or is done by the system before it gets sent to me. Thus, that is why I clean the string and make it one big string so that i am assured that all multiple spaces are truncated to one and all other white space is replaced witha null string. I hope that makes more sense.
btw, thanks for suggesting Expresso. Its saving me tons of time with testing.
AGP