in reply to Re: Speeding up a large regex match pattern
in thread Speeding up a large regex match pattern
The METAR spec document seems to use a fairly peculiar method of notation (at least to my eyes) to describe the various fields, most of which are optional.
It is a very challenging pattern to match though, no doubt about that.
One thing that does strike me is that it would appear that many parts of the METAR encoding could be greatly improved by reversing the order of some of the fragments of information.
I had some significant difficulty with matching the visibility group "VVVVVSM". The most obvious optimisation would be to move the "SM" to the start of the group, not the end. Ho hum.
Cheers.