~cyplo/dotfiles

ref: 83ddcc09dc68389b129d598722eca9e90a6dff33 dotfiles/tools/print-matches.py -rw-r--r-- 150 bytes
83ddcc09 — Cyryl Płotnicki remove broken i3 msg call 1 year, 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
import sys
import re

pattern = sys.argv[1]

p = re.compile(pattern)

for line in sys.stdin:
    m = p.match(line)
    if m:
        print m.group(1)