def pick_channels_regexp(ch_names, regexp):
    r = re.compile(regexp)
    return [k for k, name in enumerate(ch_names) if r.match(name)]
Pick channels using regular expression
dataset/ETHPy150Open mne-tools/mne-python/mne/io/pick.py/pick_channels_regexp