上記の例の様に [\w:]+Error が表示されたら Growl に通知されるようにした。この時多くの正規表現実装と同じように \0 でマッチした文字列を Growl に渡すことができた。例えば、下の画像のように \0 Occured とした状態で SyntaxError という文字列が iTerm2 上に出たら SyntaxError Occred と Growl で通知される。ついでに () でグループ化してやれば \1 などで参照することもできた。
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
