ok back to this challenge. i have made incremental changes to the base regexp but only for slight variation in spelling. asides from that the message I am parsing looks like so
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
There could be some other words between
ZZZ and DATA CRITICAL 305 M RADIUS AT 372419N/1154323W. So in other
words I want to match in bold
08/027 ZZZ DATA CRITICAL 305 M RADIUS AT 372419N/1154323W
08/035 ZAA RESPOND OTS DATA CRITICAL 25 M RADIUS AT 3725500N/1152350W
07/044 ZBB INDETERMINATE USER NO RESPONSE DATA CRITICAL 9 M RADIUS AT 3725500N/1152350W
Now a variation has shown up in the messages that looks like so:
09/055 KZLA 0902021930 0902060630 1930-2230/0230-0630 DLY QXXXX DATA CRITICAL 35 M RADIUS AT 371908N/1154250W
When I use my regexp it works out well but the myid variable is being assigned the value="DLY" but the value should instead be "KZLA"
(?<msgnum>\d\d/\d{3}) ([A-Z]{8})?(?:(?![A-Z]{8}).)*?(?<myid>[A-Z]{3,4})\b(?:(?!\d\d/\d{3}).)*?(?<event>(DATA CRITICAL )(?<radius>\d{1,}) ?M RADIUS AT (?<lat>\d{5,6}\.?\d?[NS])/(?<lon>\d{5,7}\.?\d?[EW]))
I've been experimenting with different methods to assign the correct value but any help is appreciated.
AGP