4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

iTerm2のTriggerの正規表現で後方参照

Last updated at Posted at 2012-03-10

上記の例の様に [\w:]+Error が表示されたら Growl に通知されるようにした。この時多くの正規表現実装と同じように \0 でマッチした文字列を Growl に渡すことができた。例えば、下の画像のように \0 Occured とした状態で SyntaxError という文字列が iTerm2 上に出たら SyntaxError Occred と Growl で通知される。ついでに () でグループ化してやれば \1 などで参照することもできた。

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?