Results 1 to 4 of 4

Thread: grep: Support for the -P option is not compiled into this --disable-perl-regexp binar

  1. #1
    Join Date
    Sep 2007
    Beans
    49

    grep: Support for the -P option is not compiled into this --disable-perl-regexp binar

    How can I get the -P option to work in grep program ?

    -P, --perl-regexp
    Interpret PATTERN as a Perl regular expression. This is highly experimental and grep -P may warn of unimplemented features.
    I got error when trying to use it, clearly it's not implemented
    grep: Support for the -P option is not compiled into this --disable-perl-regexp binary

    Thank you,

  2. #2
    Join Date
    Dec 2007
    Beans
    222

    Re: grep: Support for the -P option is not compiled into this --disable-perl-regexp b

    Code:
    sudo apt-get install pcregrep
    "Perl-style regexps have many useful features that the standard POSIX ones
    don't; this is basically the same as grep but with the different
    regexp syntax."
    Help yourself | [Hints] Disassemble your laptop

    "Si peccasse negamus, fallimur,
    Et nulla est in nobis veritas--"

  3. #3
    Join Date
    Sep 2007
    Beans
    49

    Re: grep: Support for the -P option is not compiled into this --disable-perl-regexp b

    After
    sudo apt-get install pcregrep

    grep: Support for the -P option is not compiled into this --disable-perl-regexp binary

    Do I have to recompile on grep ?


    I love perl regexp, because I am more familiar with it, besides that it's the most powerful regular expression that I have ever use so far. Thanks

  4. #4
    Join Date
    Dec 2007
    Beans
    222

    Re: grep: Support for the -P option is not compiled into this --disable-perl-regexp b

    No, it's a different package, see "man pcre".
    Check out this link and that one.
    Help yourself | [Hints] Disassemble your laptop

    "Si peccasse negamus, fallimur,
    Et nulla est in nobis veritas--"

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •