Article 7A12 Main


Richard’s Bridge Notation


 by Richard Pavlicek

It is desirable to have a standard format for recording, archiving and exchanging bridge deals. This should be flexible, simple and compact. A variety of formats have been proposed, but in my view they don’t pass the test.

Probably the most notable attempt is PBN (Portable Bridge Notation) which includes a few good ideas but is hopelessly bloated. For example, the syntax to state the vulnerability is: [Vulnerable “Both”].

Hello-o-o? Do I really have to write the word “Vulnerable” every time? Most writers abbreviate it in ordinary writing, so this is outrageous for a data format. And why are brackets and quotes both required?

PBN has a number of design flaws, because it was derived from a chess notation (PGN) rather than originated for bridge. For instance, the default ordering of tags is illogical, and the play syntax must have been thought up by monkeys.

Another popular format is LIN (Bridgebase) which is excellent for display purposes (e.g., segments of a bridge match) but poor for archiving because of its limited file size (16 boards typically). Single matches must be split into multiple files.

RBN conveniently stores any number of deals — a complete match, an entire event, multiple events, etc., so is ideal for maintaining a bridge database. Its organization is based on many years of working with bridge data, and the intuitive coding will be familiar to bridge players.

Try it! You’ll like it.

RBN Structure

The basic structure of RBN is that each line starts with a one-character label, a space for readability, then appropriate data to the end of line. A double line-feed (blank line) marks the end of each record. There are 16 letter labels and 10 digit labels, as summarized below:

LabelDescriptionMax LenValid Characters
DDate and time200123456789CG:?
TTitle and author128(all)
LLocation128(all)
EEvent or main heading128(all)
FForm of scoring64(all)
KTeam Names and carryovers92(all)
SSession, stage or subheading128(all)
NNames of players128(all)
BBoard number32(all)
HHands (deal diagram)7223456789AEJKNQSTWx:.;?
AAuction (w/dealer, vul)128123456789ABCDEHNPRSWXYZ:!?*^
0-9Auction note64(all)
CContract and declarer240123456789CDEHMNRSWX:
PPlays128123456789ACDHJKQSTY:;+-~.!?*^
0-9Play note64(all)
RResult and score240123456789P:+-=.
MMakes at double-dummy640123456789ABCD:+=!?
IItem list1024(all)

Digit labels (notes 0-9) must appear immediately after the A label if pertaining to the auction, and/or immediately after the P label if pertaining to the play.

In addition to labeled fields, free text may be entered at any place by starting a line with a left curly brace. The text continues, which may include multiple lines (but no blank lines), until ended by a right curly brace at the end of a line.

To illustrate the RBN format, consider the following article I wrote in 1993:

Florida Belles Are Ringers

Two Florida ladies put together a tremendous score — 78 percent — in the continent-wide International Fund Game on May 12. Helen Shanbrom and Julia Carswell played at the Palm Beach Bridge Studio, a popular club owned and operated by Daniel Cohen.

Winning is nothing new to Shanbrom, arguably the most successful club player of all time. Her partner has not been playing bridge that long; but she learns fast and has become a sound, reliable player. Carswell has posted a number of wins already.

The diagrammed deal shows the ladies in action, stampeding their opponents to the five level. Shanbrom, West, opened routinely with 1 S and Carswell, East, chose a single raise because her hand contained doubtful values — good judgment in my opinion. (North’s decision to overcall and South’s 4 D bid are not clearly understood, perhaps for the best.)

Shanbrom’s push to 4 S is best explained as “It was my turn,” but this is the kind of aggressive tactic that a clever player senses to be right at the table. Sure enough, South took the bait and pushed to 5 H (actually, North is more the culprit here for the frivolous overcall). Opportunity needs knock only once for Shanbrom, and she wielded the ax.

West dealsS J 4 2WestNorthEastSouth
None vulH A J 7 6 3 2ShanbromCarswell
D J1 S2 H2 S4 D
C 6 3 24 SPassPass5 H
S A 8 7 6 5TableS Q 10 3DblPassPassPass
H Q 10H 8 5
D K 9D Q 8 6
C A 10 8 7C K Q J 5 4
S K 9
H K 9 4
Lead: C KD A 10 7 5 4 3 2
5 H× NorthC 9

Watch the defense! Carswell led the C K and Shanbrom followed with the seven — a wisely chosen card to de-emphasize the desirability of a spade switch. (The partnership, as do most defenders, indicate suit preference when the dummy has a singleton in the suit led.) Shanbrom figured that her partner would routinely lead a spade if she held Q-J, but in the actual layout a spade shift would be costly.

How many East defenders do you think would come through? This one did! Carswell found the killing play of another club, and declarer actually went down two when he misplayed spades later. If Carswell leads any other suit at trick two, declarer can make the contract by establishing the diamonds.

Same Article in RBN

D 19930512
T Florida Belles Are Ringers:Richard Pavlicek
L West Palm Beach FL:Palm Beach Bridge Studio
E ACBL International Fund Game
F M
{Two Florida ladies put together a tremendous score — 78 percent — in the continent-wide International Fund Game on May 12. Helen Shanbrom and Julia Carswell played at the Palm Beach Bridge Studio, a popular club owned and operated by Daniel Cohen.}
{Winning is nothing new to Shanbrom, arguably the most successful club player of all time. Her partner has not been playing bridge that long; but she learns fast and has become a sound, reliable player. Carswell has posted a number of wins already.}
{The diagrammed deal shows the ladies in action, stampeding their opponents to the five level. Shanbrom, West, opened routinely with 1s and Carswell, East, chose a single raise because her hand contained doubtful values — good judgment in my opinion. (North’s decision to overcall and South’s 4d bid are not clearly understood, perhaps for the best.)}
{Shanbrom’s push to 4s is best explained as “It was my turn,” but this is the kind of aggressive tactic that a clever player senses to be right at the table. Sure enough, South took the bait and pushed to 5h (actually, North is more the culprit here for the frivolous overcall). Opportunity needs knock only once for Shanbrom, and she wielded the ax.}
N :Helen Shanbrom+Julia Carswell
B 8
H W:A8765.QT.K9.AT87:J42.AJ7632.J.632:QT3.85.Q86.KQJ54:
A WZ:1S2H2S4D:4SPP5H:XA
C 5HX:N
P CK972:CQ!H483:DA9J6:D2KH28:SJ?QKA:CA
R 9-300:0
{Watch the defense! Carswell led the cK and Shanbrom followed with the seven — a wisely chosen card to de-emphasize the desirability of a spade switch. (The partnership, as do most defenders, indicate suit preference when the dummy has a singleton in the suit led.) Shanbrom figured that her partner would routinely lead a spade if she held Q-J, but in the actual layout a spade shift would be costly.}
{How many East defenders do you think would come through? This one did! Carswell found the killing play of another club, and declarer actually went down two when he misplayed spades later. If Carswell leads _any other suit_ at trick two, declarer can make the contract by establishing the diamonds.}

Note how each label and its data are contained on a single line and there are no blank lines. (A blank line separates records.) Labels KSMI are not needed so they are omitted, which by default presumes them to be null.

Paragraphs of free text (surrounded by curly braces) can be placed anywhere, but good practice is to emulate their position before or after the hand diagram (H label) as done above. A vertical bar (|) may be used to denote a line break to keep text on a single line.

Article 7A12 MainTop Richard’s Bridge Notation

Letter Label Details

The 16 letter labels are described below. While each pertains to different data, all have the common syntax that a colon (:) is used as a separator.

D = Date and time

When the deal occurred. The date is given in fixed format (yyyymmdd) without separators. Unknown parts may be filled with a question mark (?), and mmdd or dd may be truncated. The letter C may be used after the year (or year and month) to mean ‘circa’ (approximation). Optionally, a second date may be given (yyyymmdddd) to indicate a span (if lower wraps to next month).

The date (if not a span) may be followed by a colon and the time in 24-hour fixed format (hhmmss), of which mmss or ss may be truncated. Midnight may be indicated at the end of a day as 24 or at the start as 00.

Date and time are local to the location (L label) unless followed by the letter G (GMT).

D 19980131January 31, 1998
D 199709some date in September, 1997
D 1986120911December 9-11, 1986
D 1955Cnot sure but about 1955
D 20010704:1930July 4, 2001, 7:30 pm
D 20120428:072315G time to exact second GMT

T = Title and author

The title of an article about the deal and the author’s name, separated by a colon.

T Overbid Succeeds:John Doe typical case
T Bridge Made Easytitle (author unknown)
T :Joe Blowauthor (no title or unknown)

L = Location

Where the deal occurred. This may be a single string, or two strings (with more general location first) separated by a colon.

L Fort Lauderdale FL
L Toronto ON:Royal York Hotel
L Valkenberg NL:Holland Casino

Recommended style is to use standard two-character codes for states, provinces and countries. While flawed (e.g., IL = Illinois or Israel) the chance of ambiguity is too remote for concern.

E = Event or main heading

The name of the event, or a main heading such as a catalog of lesson deals. This can be a single string, or two strings separated by a colon. If two strings, the more general one should be given first.

E 1999 Grand National Teams
E Southeastern Regional:Flight A Open Pairs
E Beginning Bridge:Lesson 11

F = Form of scoring

The kind of scoring in effect. This can be a word, phrase or one-letter abbreviation: I = IMPs, B = Board-a-match (aka Point-a-board), T = Total points, X = IMP pairs (aka Cross-IMPs), M = Matchpoints, N = Instant matchpoints, R = Rubber bridge, C = Chicago, A = Cavendish (same as Chicago but second/third dealer nonvulnerable) or P = Plus-or-fishfood (my silliness for the side that goes plus wins; honors do not count). Note that abbreviations I, B and T imply team competition; all others imply pair competition.

Optionally, this may be followed by a colon and modifying information. The word “old” is assumed to mean “prior to the scoring changes of 1987.” A year may be entered to indicate the scoring scale in use at that time.

F IIMPs
F NInstant matchpoints
F X:ButlerIMP pairs, Butler type
F I:1952IMPs using scale from 1952
F M:oldMatchpoints before 1987 changes
F RRubber bridge
F C:NS 60 Chicago, N-S have 60 partscore
F A:-HPCavendish, no honors or partscores

K = Team names and carryovers

The names of two teams in a bridge match, which may be a captain’s name, country name, etc., separated by a colon. The team given first is North-South for the first of each pair of identical deals.

Optionally, this may be followed by a colon and carryover for Team 1; then another colon and carryover for Team 2. Carryovers may be IMPs, matchpoints or total points, depending on form of scoring. Fractional carryovers are allowed and must be expressed in hundredths (two decimal places). Negative carryovers are allowed and are useful to deduct a penalty assessed in the current segment (e.g., slow play).

K Nickell:Schwartztypical case
K Italy:USA1:999:22Italy leads by 977
K Meckstroth’s Marauders:Rodwell’s Rockets wordy case
K Iceland:Bulgaria:76.33:91.50Bulgaria leads by 15.17
K France:Spain::-5Spain penalized 5
K GIB:Jack:99-8GIB up 99 but penalized 8

S = Session, stage or subheading

The part of an event, or a subheading such as a lesson topic. A number alone indicates the session (typically in a pair event). Allowed abbreviations are F = Final, P = Playoff, S = Semifinal, Q = Quarterfinal, R16 = Round of 16 (likewise for any number) or I = Initial stage (Qualifying). A colon separator allows further clarification, where a number alone indicates the segment or round.

S 2second session
S S:3semifinal, third segment
S R32:1round of 32, first segment
S I:12qualifying, round 12
S Slam Bidding:Blackwood subheading

N = Player names

Names of players in the specific order: North+South:West+East. Partners are separated by a plus sign (+) and pairs by a colon. Names may be first or last names (or both) or even non-human names such as computers. If a name is unknown, leave it empty.

If the event is a team match, this is followed by the names at Table 2, so the structure is: North+South:West+East:North+South:West+East. The composition of each team is North+South at one table and West+East at the other. Note: Team names indicated by the K label must be synchronous, showing the team that is North-South at Table 1 first.

N Wolff+Hamman:Stansby+Marteltypical single table
N Grue+Moss:Smith+Cohen:Levin+Zia:Gold+Robson typical team match
N Rosenberg+Zia:::Miller+KohlerTeam 1 (Team 2 unknown)
N :Stanley Laurel+Oliver HardyLaurel & Hardy were West-East
N GIB 4.0+Jones:GIB 4.0+GIB 4.0Jones (South) & 3 computers

B = Board number

The board or sequence number of the deal — usually just a plain number, but any notation is acceptable. Optionally, this may be followed by a colon and a plus sign (+) to auto-number subsequence records consecutively, and/or a description (what to call it).

B 6number only with period after
B 1:BoardBoard 1
B 1:+auto-number consecutively from 1
B 1:+Deal Deal 1, Deal 2, Deal 3, …

H = Hands

The cards for each player, starting with the direction given and moving clockwise. Each hand begins with a colon. Suit holdings are given in descending order (SHDC) separated by a dot (.) and cards in descending rank (AKQJT98765432).

Hands do not necessarily have to form a full deal. Empty or incomplete hands are fine as long as no card is used twice, and no hand has more than 13 cards. This allows the same syntax to store single hands, partnership hands, bridge endings, single-suit layouts, etc.

For full deals, the fourth hand is redundant and may be omitted, but the initial colon must be present (else fourth hand would be assumed not to exist). In other words, three full hands followed by a colon means “fourth hand gets the rest.”

Optionally, a semicolon may be used in place of any colon to indicate that the hand following should be hidden for the intended purpose. This is useful for quizzes, polls, play problems, etc., where only a portion of the diagram should be shown.

H W:873.A6.KT864.KQ8:96.T54.97.AJ9643:T542.K93.AQ53.52: full deal
H S:9.AK6.AKT982.K87:K7654.J73.Q65.T6:QT2.T94.J4.AQ953:full deal
H N:AKQ72…AKQ72.753::.AKQ72.753.AKQ72N-S hands (N void H, S void S)
H E:T4.8642.AKT8.K65only the East hand
H W:K9.K9.9:3.A3.Q.4:Q82…J.A:A7.7.K85-card end position
H W:43:KJ2:Q976:AT85only the spade suit
H N:QJT94…A432.5432;K5.T.KQJT98.KQJT:A876.A2.765.A876;full deal, E-W hidden
H E;K5.T.KQJT98.KQJT:A876.A2.765.A876;32.KQJ9876543…9:(same as above)

The last two examples show the exact same deal and hidden status to emphasize that the H label may start with any hand and always continues clockwise. My practice is to start with the first non-hidden hand with cards in the priority WNES.

Nonessential suit separators (dots) may be omitted when a hand has no more cards, since the hand automatically ends at a colon, semicolon, or end of line. For full deals, however, it is better (but not required) to include all separators to aid visual recognition.

Cards may also be entered as ‘x’ to indicate one of the lowest unassigned cards in that suit, or as ‘?‘ to indicate an unknown rank. The latter is often useful for presentation purposes but of course precludes any card play.

A = Auction

Dealer NESW and vulnerability ZNEBX (X = any or immaterial) then each bidding round preceded by a colon. Optionally, the dealer, vulnerability and first colon may be omitted, which presumes “WX:” by default.

Normal calls are indicated as: P = Pass, X = Double, R = Redouble, 1C = One Club, 3N = Three Notrump, A = All Pass. Also, the letter Y may be used as a query point (multiple times allowed) to mean “Your call?” as in a bidding quiz or poll. Partial or incomplete auctions are allowed (just stop writing). Complete auctions must end in A or PPP.

Any call (except A and Y) may by followed by a notation: ! = good, ? = poor, * = conventional (with no explanation) or ^ followed by 1-9 (note reference).

A SZ:1SP2SP:4SASouth deals, none vul
A WE:AWest deals, E-W vul, passed out
A NB:1SXYNorth deals, both vul, your call as South?
A 1SP2CP:2DWest deals, any vul, incomplete auction
A EB:3CP3N?P:PX!R^1Apoor 3 NT bid, good double, see Note 1
1 apparently lost his mind description of the redouble

Besides labels 1-9, the A label may be followed by the 0 label for a comment not referenced in the auction. For example:

0 North-South were a new partnership

Article 7A12 MainTop Richard’s Bridge Notation

C = Contract and declarer

The contract consists of level, strain, jeopardy and goal (in that order) but only the strain is required. Level is a digit (1-7); strain is a letter (CDHSN); jeopardy is a letter (XR); and goal is a number of tricks to win (1-13) or the letter M (maximum). Stating a goal is only necessary for endings (without a level) but is useful to show a true objective, as in a deliberate sacrifice bid.

Contract must be followed by a colon and the declarer (NESW). If the first leader is not to the left of declarer (as for an ending) append a second colon and the first leader (NESW).

C 3N:N3 NT, North declarer
C 5DR:W5 D××, West declarer
C 4SX8:E4 S×, goal 8 tricks, East declarer
C H6:S:SH win 6, South declarer, South leads
C CM:S:E C win max, South declarer, East leads

P = Play

The play sequence in the exact order of cards played. Each trick begins with the lead and is followed by the second, third and fourth plays. Tricks are separated by a colon, or a semicolon to mean “plays that follow are unimportant or trivial.” The play can end at any time (including mid-trick); just stop writing.

Plays are shown by suit and rank, except when following to the suit led, then only the rank is given. This method not only saves keystrokes but makes it easier to follow the play, since ruffs and discards stand out.

Any play may by followed by a notation: ! = good, ? = poor, * = conventional (with no explanation) or ^ followed by 1-8 (note reference). Label 0 is available for a general comment (similar to auction). Label 9 is not like 1-8 but used to summarize omitted plays, e.g., 9 Win the rest.

Besides specific plays, five pseudo plays are allowed: Hyphen (-) indicates a trivial play of the lowest unplayed card. Tilde (~) does the same but means the suit chosen is significant. Plus (+) indicates a trivial play of the highest unplayed card. Dot (.) indicates an immaterial discard. The letter ‘Y’ means “Your play?” which is useful for quiz purposes.

P D3opening lead only
P SK54T:SA87H3:HA245:HKQ8Jtricks 1-4
P HQ*3J2:HK47A:DJA53:HT68C71H Q conventional (no note), C 7 noted 1
1 subtle falsecarddescription of C 7
P SJQKA:HA---all follow low to H A at Trick 2
P SA---:D2YS A lead (all follow low), D 2 shift, your play?

R = Result and score

The result is the number of tricks won by declarer, or the letter P if passed out. This may be followed immediately by the signed (+/-) raw score relative to North-South.

Optionally, this may be followed by a colon and the effective score. This may be an equal sign (=) to indicate a push or tie, a signed (+/-) number of IMPs (+1 or -1 if board-a-match) or a plain number indicating a matchpoint percent. Decimal fractions of two places (hundredths) are allowed. All scores are relative to North-South.

R 11declarer won 11 tricks
R 10+620declarer won 10 tricks, N-S +620
R 8-300:+48 tricks won, E-W +300, N-S +4 IMPs
R P:-2passed out, E-W won 2 IMPs
R 12-980:-11 12 tricks won, E-W +980, E-W +11 IMPs
R :66.67result unknown, N-S matchpoints 66.67%
R 5:-15 tricks won, E-W won board if B-a-M
R 9-750:79 tricks won, E-W +750, E-W 93%
R 7-100:=7 tricks, E-W +100, push board

Note that a push at IMPs is shown by an equal sign. A plain zero means 0 percent (matchpoints).

M = Makes at double-dummy

This label contains double-dummy analysis of the deal; more specifically, the number of tricks declarer can win with best play and best defense. Numbers are hexadecimal (A=10, B=11, C=12, D=13) so that all makes can be shown by a single digit. The M label is divided into four parts, separated by colons, as explained below.

Part 1: Number of tricks declarer can win in the given contract with best defense. Optionally this may be followed by the status after each lead in the P label thru trick 12. Each number represents the total number of makable tricks including past tricks; thus an increase means the defense erred, and a decrease means declarer erred. To save space, equivalent numbers may be truncated from the lead-status list; so if only a partial list is given it must be terminated with a question mark (?) to mean nothing further known.

M 9makes 9 tricks with best defense
M 8998888788887 full analysis (at start and after lead to Tricks 1-12)
M AAmakes 10 tricks, same after each lead
M 9A9makes 9 tricks, 10 after opening lead, 9 thereafter
M 79?makes 7 tricks, 9 after opening lead, unknown after

Part 2: Number of tricks makable in the given contract after all opening leads, ordered high-to-low by suit then rank. Touching cards in the same suit are skipped; i.e., if leader’s spades are K-Q-9-3, the queen is omitted since the result must be the same as the king. As in Part 1, equivalent numbers may be truncated from the end, and a question mark (?) means unknown.

M :AAABBBAABA makes after 10 different leads
M :87makes 8 after highest-rank lead, else 7
M :Dmakes 13 tricks with any lead
M :99?makes 9 after highest and next-highest lead, others unknown

Part 3: Number of tricks makable by North-South in each strain (assuming best defense without specified leads). North’s makes are given first, followed by a plus (+) sign then South. Makes consist of five numbers, one for each strain in ranking order (NSHDC). Unknown makes can be truncated or replaced with a question mark (?) as a placeholder. If South makes the same as North (usually true), replace the plus sign with an equal sign (=) and omit the duplicate list.

M ::9A888=N or S win 9 in NT, 10 in S, 8 in H D C
M ::987A8+997A8 S by South plays a trick better
M ::9North makes 9 in NT, else unknown

Part 4: Analogous to Part 3 but for West-East. As a shortcut, if West’s makes plus North’s makes total 13 in all strains (quite common) this may be shown by a logical Not symbol (!); likewise for East and South.

M :::74499=West makes shown, East is same
M ::987A8=:!=North shown, all square (common)
M ::88666+88667:!! West 55777, East 55776

The M label can be used on incomplete deals provided each player has the same number of cards. Numbers then relate to the diagram as given; e.g., in an eight-card ending the highest possible make is 8.

I = Item list

This label can be used to include data for any purpose desired. Recommended format is [item]=[value] with fields separated by a colon. One of my many uses is to include awards for bids, leads or plays. For example:

I 4S=10:3N=8:5S=7:4N=6:3S=4:2N=3:6S=1

Article 7A12 MainTop Richard’s Bridge Notation

RBN Database Rules

Labels DTLEFKSNBH are presumed to repeat until altered. This is a great convenience and space saver because these labels are often the same for a group of deals, and sometimes for an entire file. Therefore, if one of these labels exists and then becomes unused, it must be explicitly set to null using the label alone (without data) to end the repetition.

The remaining letter labels ACPRMI and digit labels 0-9 do not repeat and are presumed null unless explicitly entered. Exception: Any of labels ACPRMI can be designated as ‘fixed’ if given at the first record with an exclamation point (instead of a space). For example: C!3N:S means the contract is 3 NT by South for the entire file.

The order of labels doesn’t matter, except for digit labels 0-9 which must follow the A or P label as appropriate. Logical ordering (at least for my purposes) is DTLEFKSNBHACPRMI, and I retain this order throughout for uniformity.

Labels DHACPRM allow only specific characters (as shown in the first table) and cannot contain spaces. Letter case is immaterial but can be varied for any purpose desired. My practice is to use uppercase in general, and lowercase as a flag for special treatment. For example, the label A SB:1sP2SP:4sA indicates to me that South’s bids of 1 S and 4 S should be quizzed.

A double line feed (blank line) separates records regardless of where it occurs. Therefore, free text must not contain a double line feed. Further, the last record in a file should be followed by a double line feed, not only to avoid confusing software parsers but to simplify the concatenation of two or more RBN files.

Note: RBN files follow the Unix format for line endings (LF only) because the Windows format (CR and LF) bloats the file size for no reason — or as most people have realized by now: Windows sucks.

Special characters

While not required, I give the following characters special treatment in free text:

_start or end Italicsduck _one round_ only=duck one round only
|line feednow is|the time=now is[LF]the time
^superscript next character(s)x^2=x2
{treat next character literally{^ or {| or {_=^ or | or _

To denote suit symbols, my practice is to use a lowercase ‘cdhs’ as a standalone word or combined with another character to form a bid, contract, or card. Similarly, I use a lowercase ‘n’ for a notrump bid or contract. For example:

sstandalone wordS
1hbid or contract1 H (likewise with 234567)
3nbid or contract3 NT (likewise with 124567)
d2cardD 2 (likewise with AKQJ9876543x)
c10cardC 10 (only 3-character case)

Plain data

Optionally, plain data (for any purpose) may be entered at the start of a line after all labels. Its second character (at the first instance) cannot be a space or exclamation point to be distinguishable from a label. Plain data continues until free text is met (line starting with a left curly brace) or the end of the record (double line feed). One advantage of this is to document bidding systems in a simple, readable format. For example:

A 1HP2HP:Y
2s=relay game try
2n=invitational
3c 3d 3s=natural slam try
3h=preemptive
3n=choice of game

Paired records

A common use for an RBN file is to document team matches between two tables playing the same deal. To distinguish this, the two records are separated by a line containing an exclamation point only (instead of a blank line). For example:

B 10
H W:KQ973.AQJ.74.KJ4:AJ5.64.9862.AQ62:82.98.AKQT53.T98:
A EB:3DA
C 3D:E
R 10
!
A EB:PP1NP:3NA
C 3N:W
R 9

Note that labels B and H apply to both records since they repeat by default.

File signature and limits

To be identified as an RBN file, the first line should begin with “% RBN” (no quotes) or “%RBN” (the space is optional). A percent sign may also be used at the start of any line (except within free text) to indicate extraneous information that is not part of the data. My practice is to use this only at the start of a file to describe its contents. For example:

% RBN rpbridge.net 37 records 36 deals
D 19890919
T Royal Viking Pairs:Richard Pavlicek
L Analyses 7N05
{The 1989 Royal Viking Pairs begins…

Note there is no blank line between extraneous text and the first label, as it would terminate the record. (Adding a blank line would result in an extra record with all null labels.)

The maximum length of each label (shown in the first table) includes the label and space but not the LF. Of course it is possible to need more, e.g., with excessively long names, but in practice this has never been an issue. Note that free text has no limit.

There is no maximum length of an RBN record, or an RBN file, other than what your operating system can handle.

RBX format

I have found it useful for online purposes to place each RBN record on a single line. The reason is to allow each record to be retrieved easily with a single file read. Conversion is simple: Replace each line feed (except the last of each record) with a right curly brace. I call this RBX format. Note that the file size is unchanged.

Parsing an RBX file is the same as RBN except: Each label ends with a right curly brace, and free text ends with two right curly braces (a single right curly brace within free text indicates a LF).

Article 7A12 MainTop Richard’s Bridge Notation

© 2023 Richard Pavlicek