# Formatting Filtered Messages

The filtered message view can control exactly how the messages are displayed and logged.

By default, if a format is not specified, the body of the APRS Message (after the second ':' that ends the addressee, and before any '{'-prefixed message sequence identifier) is displayed as-is as a single line of text.

However, if a format string is provided, the message is displayed according to the format. The format string consists of substitution directives enclosed in curly braces {} and literal text that appears exactly as typed in the recorded messages. The available substitution directives are:

| Directive | Substituted Data
{0} | the whole message body (same information as would be displayed for no format string)
{1} | first regular expression group's match in filter (only non-empty if a regular expression filter with grouping is specified)
{2} though {9} | second through ninth regular expression group's match
{C} | callsign of original message sender (not I-Gate callsign)
{A} | addressee field of APRS message
{L} | sender's latitude in standard APRS dd mm.mmN format
{l} (this is a lower-case L, not a 1 digit) | sender's longitude in standard APRS ddd mm.mmW format
{L#0.00000} | sender's latitude in decimal degrees (North positive), using Java DecimalFormat to specify the formatting
{l#0.00000} | sender's longitude in decimal degrees (East positive), using Java DecimalFormat to specify the formatting
{dd/MMM/yyyy HH:mm:ss} | time message was received, formatted using the format characters defined for the Java SimpleDateFormat class, such as: d - day of month M - month of year y - year H - hour of day (24-hour) h - hour of day (12-hour) m - minute of hour s - second of minute

Anything not in a substitution directive is copied as-is to the message log window and log file.

For example, the format string:

{dd/MMM/yyyy HH:mm:ss},":{A}:{0}"

would approximate the comma-separated value (CSV) format used by the File->Save APRS Packets menu item to record messages to a file, except (a) the file recorded here would only contain messages and not all APRS packets, and (b) any third party I-gate header would be removed.