How do I install pcre with homebrew?

2019-08-04 08:27发布

Background

I have a regex I want to run across multiple lines. My understanding is that OSX's grep can't handle this (please correct me if I'm wrong!). So after some Googling I found that PCRE would do what I want. I tried to install it with brew install pcre as a few sites suggested. It seems to have worked. If I run brew install pcre again I get this error Warning: pcre-8.40 already installed and I have a /usr/local/Cellar/pcre/8.40/ directory.

Problem

After installing PCRE via homebrew I get this error pcre: command not found when I try to use the pcre command.

Questions

Is there a second step I need to run after brew install pcre? I didn't find anything listed for this, but perhaps I missed it. I also found these instructions for installing PCRE manually. Is there a downside to doing this over homebrew?

标签: homebrew pcre
1条回答
爷的心禁止访问
2楼-- · 2019-08-04 09:01

homebrew-core/pcre package is shipped with these binaries, so you probably need to try them:

  • pcre-config
  • pcregrep
  • pcretest
查看更多
登录 后发表回答