ProPokerTools
Back to Main Documention

Range of Hands Syntax Help

Generic Range Syntax

Generic range syntax is the latest mini-language for describing ranges of poker hands. It is more powerful and more concise than any of the classic (read 'old') ProPokerTools syntaxes.

Generic Syntax Documentation

Extensive Examples

Generic Syntax Documentation

Games Supported

Generic Syntax is currently available for all games.

Generic Syntax may also be used to specify the board and dead cards.

Ranks and Suits

Here are some example 4-card (omaha) ranges using only the above:

Percent of Hands

ProPokerTools has its own ranking of hands for omaha, omaha hi/lo, hold'em, five-card omaha, and five-card omaha hi/lo. Here are a few examples of how to generate ranges using these rankings:

The default rankings are for full-ring games. Also provided are rankings for 6-handed games. To specify the 6-handed rankings, simply add "6h" after the percentage sign:

Text files containing the hand orderings can be downloaded below:

If you are curious about how these orderings were created, you can check out these blog posts:

Combining Ranges

There are three ways to combine multiple ranges.

Note that all three combinators (",", ":", and "!") can be used together. For instance, in omaha, "AA:xxyy, JJ!JJJ, KK" means "double suited aces or a hand with exactly two jacks or a hand with at least two kings."

Rank Spans

Rank spans allow you to specify cards that vary from a start rank to an end rank. This is easier explained with a few omaha hand examples:

It is possible to use multiple rank spans in the same hand if they are enclosed in square brackets. For instance: Furthermore, you can use a trailing plus or minus to indicate ascending or descending ranges: Finally, suits and suit variables are allowed, as long as both sides match:

Rank and Suit Lists

Occasionally, you want to have a card match a particular set of ranks, suits, or cards. Here are some examples:

Card Order

Card order is preserved for games where the order of cards is significant (stud, stud-8). Card order is ignored for other games (hold'em, omaha, omaha-8). Card order is also preserved for flop game boards on the turn and river.

Card order in Stud Games

In seven-card stud, the order of the cards as they come out is significant except in the case of the first two cards. For instance, "KsJhTd" and "KsTdJh" are NOT considered the same hand. "KsJhTd" and "JhKsTd" ARE considered the same hand, because the order of the first two cards is not considered significant. When combining ranges, card order is respected for cards on third-street and beyond. For instance, "KQJ:xxy" implies a stud hand with a suited king-queen in the hole and an off-suit jack showing (an equivalent way to write it wold be "KxQxJy").

Card Order in Flop Games

There is no concept of card order in generic range syntax for Hold'em and Omaha. For instance, in Hold'em, "KJ:hd" translates directly to "a hand with a king and a jack AND a hand with a heart and a diamond". As such, it is equivalent to "KhJd, KdJh" - it is NOT the same as "KhJd". Similarly, in Omaha, if one wanted to specify a hand with ace-high flush potential in hearts single-suited, one would write "Ahhxy" - it is NOT correct to write "A:hhxy", as that would include hands such as "AcJs7h6h".

Card Order on Flop Game Boards

For games with a shared board (hold'em, omaha, omaha-8), the order of the first three cards (the "flop") is not significant, while the order of the last two cards (the "turn" and "river") is significant. For instance, the boards "KKJ" and "JKK" are equivalent - they translate to "a flop with two kings and one jack". However, the boards "sshds" and "sshsd" are NOT equivalent - the first board has a flop with two spades and one heart, a diamond on the turn, and a spade on the river, while the second board has the same flop but a SPADE on the turn and a DIAMOND on the river.

Card Counts

For games where the number of cards in a hand is always known (hold'em always has 2 cards, omaha always 4), ranges are always implicitly 'topped off' with wildcards to bring the number of cards up to the correct number. For instance, in omaha, "AA" is equivalent to "AA**", and "KJ:xxy" is equivalent to "KJ**:xxy*".

For stud games, card counts can vary. For stud and stud-8, card counts are brought up to a minimum of three cards, but no other topping-off is performed. For example, "KJ" is equivalent to "KJ*" (because all hands are brought to a minimum size of three). In addition, sub-ranges can only be combined if they have the same number of cards listed. For instance, "KJ84:xxyz" is legal, whereas "KJ84:xx" is not.

No Pair Constraint

You can enclose any number of cards in a subrange in curly braces to indicate that there are no paired cards. For instance:

Special Stud Syntax

The pipe '|' character can be used to delineate separate ranges for portions of a stud hand. For instance:

Note that each of the range pieces separated by '|' are completely independent of each other. This means, for instance, that "xx|xx" does NOT mean four suited cards - it means two suited cards in the hole and two suited cards showing.

Syntax Macros

Syntax macros are a useful way to avoid typing in the same string of characters over and over again. Macros begin with a $ and may contain numbers and letters. Macros may reference other macros (but no macro may reference itself). The Generic Syntax comes with the following built-in macros:

Macro Meaning Games Translates to Example
$s suited constraint Hold'em :xx AK$s - ace-king suited
$o off-suit constraint Hold'em :xy JT$o - jack-ten off-suit
$B big card All [A-J] $B$B - two big cards
$M middle card All [T-7] $M$M - two middle cards
$Z small card All [6-2] $Z$Z - two small cards
$L low card All [A,2,3,4,5,6,7,8] $L$L$L$L!RRRR - four cards that can make a low (omaha hi/lo).
$N no-low card All [K-9] $N$N$N$N - four cards that cannot make a low (omaha hi/lo).
$F face card All [K-J] $F$F - two face cards
$R broadway card All [A-T] $R$R - two broadway cards
$W wheel card All [A,2,3,4,5] $W$W - two wheel cards
$ds double-suited constraint Omaha, Omaha Hi/Lo :xxyy AA$ds - double-suited aces
$ss single-suited constraint Omaha, Omaha Hi/Lo :xxyz AKQJ-9876$ss - single-suited medium-to-large rundown (hand has three suits)
$np no pairs constraint Omaha, Omaha Hi/Lo !RR 15%$np - a hand in the top 15% with no paired cards
$op one pair constraint Omaha, Omaha Hi/Lo :RRON 5%$op - a hand in the top 5% with exactly one pair (and no trips)
$tp two pair constraint Omaha, Omaha Hi/Lo :RROO 20%tp - a hand in the top 20% with two pair
$nt no trips constraint Omaha, Omaha Hi/Lo !RRR 50%$nt - a hand in the top 50% with no trips (or quads)
$0g a zero-gap rundown Omaha, Omaha Hi/Lo AKQJ- $0g:10% - a zero-gap rundown in the top 10% of hands
$1g a one-gap rundown Omaha, Omaha Hi/Lo (AKQT-, AKJT-, AQJT-) $1g:20% - a one-gap rundown in the top 20% of hands
$2g a two-gap rundown Omaha, Omaha Hi/Lo (AKQ9-, AKT9-, AJT9-) $2g:ss - a two-gap rundown with two or more spades

Weighted Ranges

Weighted ranges are supported for hold'em, omaha, and omaha hi/lo.

Weighted ranges allow you to specify the relative probabilities of hands appearing in a range. For instance, if we want a range where aces and kings are always played but queens are only played half the time, we could write "AA-KK@100,QQ@50".

Click here for more details on weighted ranges

Generic Syntax Odds and Ends

Key Differences vs. Classic Syntax

Here are a few quick notes for those of you who have made extensive use of the classic ProPokerTools range of hands syntax:

Hold'em Players
Omaha Players
Stud Players

Extensive Examples

Hold'em Examples

Omaha Examples

Stud Examples

Board Examples

Classic Hold'em Range Syntax

The examples below show the set of features available in the Hold'em Range Syntax

AsAh - ace of spades and ace of hearts
AA any pair of aces
AA, KK a pair of aces or kings
A* any hand with an ace in it
** - any two cards
JTs - jack-ten suited
JTo - jack-ten off suit
JT - any jack-ten
A*s - any suited ace
*h*h - any two hearts
AA, KK, AK - aces, kings, and ace-king
X% - The top X% of hands
A5-A2 - equivalent to A5,A4,A3,A2
AK-JT - equivalent to AK,KQ,QJ,JT
QTs-97s - equivalent to QTs, J9s, T8s, 97s
AA-TT, AK, AQ, AJs - any pair tens or higher, any ace-king or ace-queen, and ace-jack suited

Classic Omaha Range Syntax

The examples below show the set of features available in the Omaha Range Syntax

AsKsTdTh - ace of spades, king of spades, ten of diamonds, and ten of hearts
AA** - any hand with at least two aces
AA**, KK** - any hand with at least two aces or two kings (',' is the union operator)
AA** & KK** - any hand with two aces AND two kings ('&' is the intersection operator)
AAKK - another way of writing the above
15% ! AA** - A hand in the top fifteen percent of hands EXCLUDING those with two aces ('!' is the difference operator)
(88**, (99** & *s*s**)) ! 10% - Use parentheses for grouping. Operators in ascending precedence order are '&', '!', ',', '()'.
*h*h** - any hand with at least two hearts
X% - Hands in the Xth percentile or better.
15%-30% - A hand in the 15th to 30th percentile
BBMM - two big (A,K,Q,J) and two middle (T,9,8,7)
ZZLL - two small (6,5,4,3,2) and two low (A,2,3,4,5,6,7,8) cards
NNWW - two non-low (K,Q,J,T,9) and two wheel (A,2,3,4,5) cards
AsBsAhBh - ace-big of spades and ace-big of hearts

Classic Stud Range Syntax

The examples below show the set of features available in the Stud Range Syntax

* * | Ks - any two hole cards and Ks up
*s *s | Ks - two spades in hole with Ks up
Js Qs | Ks - Js, Qs, Ks
Js Qs Ks - Also Js, Qs, Ks - no pipe needed if all cards exact
J Q | Ks - any jack and queen with Ks
9+ 9+ | Ks - two cards nine or higher with Ks
9+s 9+s | Ks - two spades nine or higher with Ks
88-QQ | Ks - 88, 99, TT, JJ, or QQ with Ks
22-AA, *s *s| Ks 2c Ts - pair, trips, or flush draw on fifth street
22-AA, *s *s| Ks 2c Ts 8h | *d, *h - Red card flashed on river
B M | Ks - a big (A,K,Q,J) and middle (T,9,8,7) card with Ks
Z L | Ks - a small (6,5,4,3,2) and "low" (A,2,3,4,5,6,7,8) card with Ks
N W | Ks - a "no-low" (K,Q,J,T,9) and wheel (A,2,3,4,5) card with Ks

Classic Razz Range Syntax

The examples below show the set of features available in the Razz Range Syntax

A35 - An Ace, a three, and a five
JJ4 - Two Jacks and a four
**6 - Two random down cards and a six
9- 9- 4 - Two down cards nine or lower and a four
3+ 3+ 9 - Two down cards three or higher and a nine
(T- 7- 4) - Three DIFFERENT ranks - a ten or lower, a seven or lower, and a four

Use parentheses to force ranks to be all different. Range of hands currently supported on down cards only (cards one, two, seven).