lib: Add regexp searching for mid: prefix