What is regex to search and validate AIS NMEA sentences?
Asked
Active
Viewed 221 times
1 Answers
0
According to https://gpsd.gitlab.io/gpsd/AIVDM.html, a safe bet that any such sentence containing an A or B channel code in field 5 is AIVDM/AIVDO.
For now, I am using regex
[A-Z] \w+,\d,\d,(?:\d{1}|),[A-B],[^,]+,0\*([A-Za-z0-9]{2})
Hope this helps.

panoet
- 3,608
- 1
- 16
- 27