mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-10 01:17:42 +01:00
14 lines
154 B
Python
14 lines
154 B
Python
|
import re
|
||
|
|
||
|
pattern = "(actor)\/([\d])\/(on|toggle|off)$"
|
||
|
|
||
|
p = re.compile(pattern)
|
||
|
result = p.match("actor/1/toggle")
|
||
|
|
||
|
print(result, result.group(3))
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|