Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?:X-)?QSO:\s+([0-9]*)\s+(DG|RY|PH|CW|FM)\s+(\d\d\d\d-\d\d-\d\d)\s+(\d\d\d\d)\s+[A-Z0-9\/]{3,15}\s+(.*)\s*([A-Z0-9\/]{3,15})\s+(.*)\s{1,}[0|1]
/
gm

Description

Parses the QSO line of the Amateur radio contest log file format called Cabrillo. This handles the CQ World-wide contest exchange format of RS[T] and a zone. It would be a starting point for other exchanges like ARRl Field Day or another one with spaces in the exchange. This does handle either a QSO: tag or an X-QSO: tag for deleted X-QSO entries.

Submitted by NY4I - 15 days ago (Last modified 15 days ago)