-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
問題 147 で grep -P
と grep -z
の組み合わせがうまく動かない
#52
Comments
こちら対応おそくなってすみません。週末対応します。 |
これは間違いといいますか、念の為が念の為になっていないので、-Eのほうがいいですね(ちょっとご都合主義ですが)。修正しておきます。ありがとうございました。 |
メモ:
|
ebanさんから。「PCREだと改行が.にマッチしない」というのが理由とのこと。-Pをつかったまま修正するなら↓。
|
↑ということで、ライブラリのバージョン違いと言うよりは、本書の記述の単なる間違いでした。しばらくしたら閉じます。 ありがとうございました。 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
printf '<td>\ncell</td>\n' | grep -zoP '<td[^<]*>.*?</td>'
を実行しても何も表示されない(行をまたいだ<td>...</td>
にマッチしない)。man grep には-P
と-z
の組み合わせは experimental と書いてある。Ubuntu 20.04, grep 3.4, libpcre 3.13.3
The text was updated successfully, but these errors were encountered: