Two Card Range Notation (Hold'em, 7 Stud, 7 Stud/8, Razz)

Pokerini uses a simple notation that allows you to specify Hold'em hand ranges or 7 Card Stud and Razz starting hole cards quickly and concisely. This page will explain the details of the range notation from basic to advanced techniques.

When you set the Options...Allow Hand Ranges and click the Range button for a particular hand, you can specify a percent range of starting hands for that player. Selecting Options...Show Hand Filters will add a text box filter next to each hand with percent ranges shown. Equity calculations will include hands in the given percent range and in the filter range (with dead cards removed, of course). Setting the range to 0–100% will only limit the hands by the filter.

Basic Examples

These tables give some basic examples:

Pair ranges
Filter Matches Number of Hands
QQ+ Any pair of queens or higher 18
55- Any pair of fives or lower 24
QQ-55 or 55-QQ Any pair between fives and queens 48
Single non-pair hands
Filter Matches Number of Hands
AK or KA Any ace-king 16
AKs or KAs Any suited ace-king 4
AKo or KAo Any unsuited ace-king 12
Suit ranges
Filter Matches Number of Hands
cc All club-club suited hands 78
c. or .c Any hand with at least one club 585
sh or hs Any hand with 1 spade and 1 heart 169
Non-pair high card ranges
Filter Matches Number of Hands
A9+ A9, AT, AJ, AQ, AK 80
A9s+ or A9+s A9s, ATs, AJs, AQs, AKs 20
A9o+ or A9+o A9o, ATo, AJo, AQo, AKo 60
AJ-A8 AJ, AT, A9, A8 64
AJ-A8s AJs, ATs, A9s, A8s 16
AJ-A8o AJo, ATo, A9o, A8o 48
Q8+ Q8, Q9, QT, QJ 64
J7s+ or J7+s J7s, J8s, J9s, JTs 16
Two non-pair cards in a range
Filter Matches Number of Hands
{J-A} AK, AQ, AJ, KQ, KJ, QJ 96
{J-A}s AKs, AQs, AJs, KQs, KJs, QJs 24
{6-T} T9, T8, T7, T6, 98, 97, 96, 87, 86, 76 160
{6-T}o T9o, T8o, T7o, T6o, 98o, 97o, 96o, 87o, 86o, 76o 120
{A35} A3, A5, 35 48
{A345}dd Ad3d, Ad4d, Ad5d, 3d4d, 3d5d, 4d5d 6

Complicated ranges can be constructed using a comma separated list. For example, if you want to specify a range that includes any pair of tens or better, an ace with an eight or better or king-queen, you can write "TT+, A8+, KQ".

Read on to learn some advanced techniques!

Understanding How Hands Are Filtered

It's good to know what happens internally when Pokerini filters hands. This will help you quickly specify your hand ranges.

There are 1326 two card combinations. That's all the ways you can choose 2 cards out of 52. We can represent each card by its rank and suit using 2 characters. Rank characters are: 2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, K and A. Suit characters are: c, d, h, s. So, ace of clubs is "Ac", ace of diamonds is "Ad", nine of hearts is "9h", and two of spades is "2s".

Any 2 card starting hand can then be represented by 4 characters. For example, the ace of clubs with five of diamonds would be "Ac5d". This is fine if we were only going to specify one or two hands, but we'd like to specify things such as "any 2 clubs", "any hand with at least one ace, ten or five", "any hand with at least one heart", or "any two cards nine or higher."

Pokerini represents each hand in several ways when determining if a hand belongs to the given range. The following table illustrates this.

Different ways to classify starting hands
Hand Card 1/Card 2 Ranks Ranks/Suitedness Suits Ranks/Trailing Suits
Ac5d Ac5d, 5dAc A5, 5A A5o, 5Ao cd, dc A5cd, 5Adc
KhQh KhQh, QhKh KQ, QK KQs, QKs hh KQhh, QKhh
9c9s 9c9s, 9s9c 99 99o cs, sc 99cs, 99sc

For each of the 1326 starting Hold'em hands (or Seven Card Stud or Razz starting hole cards combinations), Pokerini will try to match the pattern you type into the filter text box to one of the representations in the above table. If there is a match, that hand is added to the range. For example, "99" will match all 6 pairs of nines, "A5o" will match all 12 ways to have ace-five offsuit, "78" will match all 16 combinations of a seven-eight, and "hh" will match all 78 hands that have 2 hearts.

Advanced Ranges

Pokerini uses regular expressions to match hand representations. This provides a powerful way to specify ranges, but you only need to know basic regular expression syntax to specify most ranges.

Using square brackets '[' and ']'

Putting characters between '[' and ']' will match exactly one of those characters. This is called a character set. For example, "[AKQ]" will specify an ace, king or queen. A hyphen can be used to specify a range of ranks. For example, "[8-Q]" will specify one of the characters 8, 9, T, J or Q. (Note that Pokerini turns things like "[8-Q]" into "[89TJQ]" before feeding it to the regular expression matching algorithm.)

Matches using square brackets
Filter Matches Number of Hands
A[KQ54] AK, AQ, A5, A4 64
[AK][789] A7, A8, A9, K7, K8, K9 96
[8-T]7s 87s, 97s, T7s 12
[8-T]7o 87o, 97o, T7o 36

Using the dot '.'

The period or dot '.' will match any single character.

Matches using a dot
Filter Matches Number of Hands
A. AA, AK, AQ, AJ, AT, A9, A8, A7, A6, A5, A4, A3, A2 198
AsK. AsKc, AsKd, AsKh, AsKs 4
c. Any hand with at least one club. 585
[AK7]. Any hand with at least one A, K or 7. 546
[AK7].s Any suited hand with at least one A, K or 7. 132
[AK7].cc or [AK7]c.c Ac, Kc or 7c with any other club. 33

Using curly braces '{' and '}' to specify 2 card combinations excluding pairs

The curly braces '{' and '}' enclosing a range of rank characters will specify any combination of ranks from that range—excluding pairs.

Matches using '{' and '}'
Filter Matches Number of Hands
{A-T} OR {T-A} AK, AQ, AJ, AT, KQ, KJ, KT, QJ, QT, JT 160
{A-T}s AKs, AQs, AJs, ATs, KQs, KJs, KTs, QJs, QTs, JTs 40
{A-T}cc AcKc, AcQc, AcJc, AcTc, KcQc, KcJc, KcTc, QcJc, QcTc, JcTc 10
{A5-7} A5, A6, A7, 56, 57, 67 96
{AKQ}cd AcKd, AdKc, AcQd, AdQc, KcQd, KdQc 6

Using the plus '+'

Pluses are used to specify ranges such as "QQ+" or "A9+", but these pluses actually get removed during the preprocessing stage—"QQ+" becomes "(QQ|KK|AA)" and "A9+" becomes "A[9TJQK]". This happens automatically and you need not worry about it.

But, if you use a plus not directly after 2 rank characters, then the plus matches at least one or more of the previous character or characters in a character set. The only time you need to (or should) use this is to specify any 2 cards in a rank range including pairs. For example, "[JQKA]+" will match a J, Q, K or A. The plus will try to match J, Q, K or A again giving us all hands that contain 2 cards jack through ace.

Now, there are 3 types of representations for each hand that start with 2 rank characters. For example, "Ac5d" is represented by ranks ("A5" or "5A"), ranks/suitedness ("A5o" or "5Ao"), and ranks/trailing suits ("A5cd" or "5Adc"). Each of these types has a different number of characters (2, 3 or 4), so after the '+' we can specify ('o' or 's') or 2 suit characters to limit the range, and we'll automatically only match the representation we want.

Matches using a plus
Filter Matches Number of Hands
[QKA]+ AA, AK, AQ, KK, KQ, QQ 66
[QKA]+s AKs, AQs, KQs (No pairs! They're never suited) 12
[QKA]+o AA, KK, QQ, AKo, AQo, KQo 54
[QKA]+ss AsKs, AsQs, KsQs 3
[QKA]+sd AsAd, AsKd, AdKs, AsQd, AdQs, KsKd, KsQd, KdQs, QsQd 9

Using the vertical bar '|' to specify OR

The square bracket notation such as "[2345]" indicates a choice between several single characters, and this is sufficient (along with the previous techniques) to build many ranges. A vertical bar (pipe) '|' means OR in regular expressions and can be used to specify a choice between groups of 2 or more characters. You need to place the options in parentheses to give the proper logic (because of order of precedence). For example, "AK(cc|dd)" would match "AK" followed by "cc" or "dd" which would match ace-king suited in clubs or suited in diamonds. "(AK|T9)hh" would match ace-king suited in hearts or ten-nine suited in hearts. These could be defined alternatively as "AcKc,AdKd" and "AhKh,Th9h", but there could be more complicated cases where it's shorter or easier to use the '|' notation.

You probably don't need to use things like this very often, but they illustrate how you can use '|'.

Matches using a vertical bar
Filter Matches Number of Hands
AK(cc|dd|hh) AcKc, AdKd, AhKh 3
(AK|T9|98|87)hh AhKh, Th9h, 9h8h, 8h7h 4
[AKQ].(c.|.c) Any hand with A, K, Q and at least one club. 240

Pokerini also turns commas into vertical bars before processing the range, so commas can be used to specify OR, but it's easier to read if you reserve vertical bars for situations like in the above table. For example, "AJ+, A6s+, AK(cc|dd|hh)".

Preprocessing of the Filters

Pokerini follows these steps internally to transform the text in the filter box before trying to match hands.

  1. Remove all white space.
  2. Replace commas ',' with vertical bars '|'.
  3. Remove consecutive multiple vertical bars or vertical bars at the beginning or end.
  4. Apply a sequence of custom regex replacement rules specified in the file (install_folder)/regex_rules/Hold'em.txt. (or '7 Stud.txt', '7 Stud HL8.txt', 'Razz.txt')
  5. Replace pair ranges:
    1. Things like "88-JJ" or "JJ-88" get replaced by "(88|99|TT|JJ)"
    2. Things like "QQ+" get replaced by "(QQ|KK|AA)"
    3. Things like "55-" get replaced by "(22|33|44|55)"
  6. Replace high card with kicker ranges:
    1. Things like "KT-K5" or "K5-KT" get replaced by "K[56789T]"
    2. Things like "Q8+" get replaced by "Q[89TJ]"
    3. Things like "Q8s+" get replaced by "Q[89TJ]s"
  7. Replace "no pair" ranges (but this notation is deprecated):
    1. Things like "J^K" or "K^J" get replaced by "(J[KQ]|K[JQ]|Q[KJ])"
    2. Things like "J^" get replaced by "(J[QKA]|Q[JKA]|K[QJA]|A[QKJ])"
  8. Replace rank character ranges in square brackets:
    1. Things like "[8-Q]" or "[Q-8]" get replaced by "[89TJQ]"
    2. Things like "[AKT-7]" get replaced by "[AK789T]"
  9. Replace rank character ranges in square brackets and curly braces:
    1. Things like "[8-Q]" or "[Q-8]" get replaced by "[89TJQ]"
    2. Things like "[AKT-7]" get replaced by "[AK789T]"
    3. Things like "{8-Q}" or "{Q-8}" get replaced by "{89TJQ}"
    4. Things like "{AKT-7}" get replaced by "{AK789T}"
  10. Replace "no pair" ranges in curly braces:
    1. Things like "{JQK}" or "{KQJ}" get replaced by "(J[KQ]|K[JQ]|Q[KJ])"
    2. Things like "{A357}" get replaced by "(3[57A]|5[37A]|7[53A]|A[573])"