Skip to content

練習 3.1.c \N は数字を表すメタ文字ではない #8

Closed

Description

@kariya-mitsuru

PDF 版 P.129 で、

Perl、Ruby、Pythonなどのモダンな言語の正規表現では、\Nで数字を表すなど、メタ文字が充実しています。

との記載がありますが、Perl(PCRE)では \N は数字を表すメタ文字ではなく改行文字以外を表すメタ文字で、この記法は Ruby や Python には無いようです。

なお、完全に余談ですが Perl と Python 3.8 では \N{name} で Unicode 文字を名前で指定できるようです。

Activity

  1. added
    誤り報告誤字脱字、内容に関する誤りの報告
    on Oct 4, 2021
  2. ryuichiueda commented on Oct 5, 2021

    @ryuichiueda
    Contributor

    お手数かけます!これはたぶん\dの間違いです。確認して正誤表に掲載します。

  3. ryuichiueda commented on Oct 5, 2021

    @ryuichiueda
    Contributor
  4. kariya-mitsuru commented on Oct 5, 2021

    @kariya-mitsuru
    ContributorAuthor

    あ、そちらに直されるのであれば P.127 の練習問題 10 行目(小問 5)も直された方が良いです。
    (P.129 はそちらの解答なので)

  5. ryuichiueda commented on Oct 5, 2021

    @ryuichiueda
    Contributor

    あ、そうですね。何度もすみません!

  6. ryuichiueda commented on Oct 5, 2021

    @ryuichiueda
    Contributor

    p.127の修正も正誤表に追加しました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    誤り報告誤字脱字、内容に関する誤りの報告

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions