You are using a character class: [...]. These act as sets; any of the characters you name in them will match. Your character class will match any 1, | or 0 character, the 3 unique characters you named in the class. You didn't specify a multiplier after the [...] character class, so it'll match just one character:
>>> re.match(',([11|01])$', ',1')
<_sre.SRE_Match object at 0x1106d1648>
>>> re.match(',([11|01])$', ',0')
<_sre.SRE_Match object at 0x1106d16c0>
>>> re.match(',([11|01])$', ',|')
<_sre.SRE_Match object at 0x1106d1648>
Remove the class if you want to match exact characters:
pat = ',(11|01)$'
which matches either the literal characters 11 or 01:
>>> re.match(',(11|01)$', ',11')
<_sre.SRE_Match object at 0x1106d16c0>
>>> re.match(',(11|01)$', ',01')
<_sre.SRE_Match object at 0x1106d1648>
or, if you still want to use a character class:
pat = ',([01]1)$'
Now the parenthesis are no longer required to group the | or operator, so you can drop those to simplify things down to:
pat = ',[01]1$'
Demo:
>>> re.match(',[01]1$', ',01')
<_sre.SRE_Match object at 0x1106bc5e0>
>>> re.match(',[01]1$', ',11')
<_sre.SRE_Match object at 0x1106bc648>
>>> re.match(',[01]1$', ',00') is None
True
>>> re.match(',[01]1$', ',10') is None
True
>>> re.match(',[01]1$', ',|') is None
True