Aptitude regex engine The 2019 Stack Overflow Developer Survey Results Are Inapt-get or...

Loose spokes after only a few rides

I am an eight letter word. What am I?

writing variables above the numbers in tikz picture

How to type a long/em dash `—`

How do PCB vias affect signal quality?

Why was M87 targeted for the Event Horizon Telescope instead of Sagittarius A*?

Slides for 30 min~1 hr Skype tenure track application interview

Is it correct to say the Neural Networks are an alternative way of performing Maximum Likelihood Estimation? if not, why?

Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?

Why isn't the circumferential light around the M87 black hole's event horizon symmetric?

If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?

Cooking pasta in a water boiler

Will it cause any balance problems to have PCs level up and gain the benefits of a long rest mid-fight?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

What information about me do stores get via my credit card?

How do I free up internal storage if I don't have any apps downloaded?

How to charge AirPods to keep battery healthy?

Can a flute soloist sit?

How did passengers keep warm on sail ships?

Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?

How can I add encounters in the Lost Mine of Phandelver campaign without giving PCs too much XP?

What is this sharp, curved notch on my knife for?

Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?

Flight paths in orbit around Ceres?



Aptitude regex engine



The 2019 Stack Overflow Developer Survey Results Are Inapt-get or aptitudeWildcards in aptitudeForcing Bash to use Perl RegEx EngineAptitude wants to remove tons of packagesaptitude unmarkauto trying to remove packagesExport download packages in Aptitudeaptitude search ?narrow vs ?andregexp with aptitude part 2Show aptitude parameters in visual modeaptitude, /etc/alternatives/aptitude, symbolic linking and aptitude-curses





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







3















I was trying to lookup the versions of libdb in the debian archives with something like that:



$ aptitude search '~S~ndev$(~nlibdb~(d~|-~)!~v~rnative)'


which didn't work as expected so I changed the search pattern for 'digit or dash' to a (malformed?) bracket pattern



$ aptitude search '~S~ndev$(~nlibdb[[:digit:]-]!~v~rnative)'


which did the job.



Curious about the engine under the hood I tried backreferencing



$ aptitude search '~n~([[:digit:]]~)1>~rnative'


which also worked and led me to the conclusion that it must be GNU ERE.



So I have two questions now:




  1. Does aptitude use GNU EREs?

  2. Is there any way to get aptitude to accept PCREs?


I hope someone can clarify this for me.










share|improve this question























  • Apparently aptitude does not understand character class d , but you could use [0-9] or [[:digit:]], instead.

    – jarno
    14 hours ago













  • What is tne meaning of $( ... ) in command?

    – jarno
    14 hours ago


















3















I was trying to lookup the versions of libdb in the debian archives with something like that:



$ aptitude search '~S~ndev$(~nlibdb~(d~|-~)!~v~rnative)'


which didn't work as expected so I changed the search pattern for 'digit or dash' to a (malformed?) bracket pattern



$ aptitude search '~S~ndev$(~nlibdb[[:digit:]-]!~v~rnative)'


which did the job.



Curious about the engine under the hood I tried backreferencing



$ aptitude search '~n~([[:digit:]]~)1>~rnative'


which also worked and led me to the conclusion that it must be GNU ERE.



So I have two questions now:




  1. Does aptitude use GNU EREs?

  2. Is there any way to get aptitude to accept PCREs?


I hope someone can clarify this for me.










share|improve this question























  • Apparently aptitude does not understand character class d , but you could use [0-9] or [[:digit:]], instead.

    – jarno
    14 hours ago













  • What is tne meaning of $( ... ) in command?

    – jarno
    14 hours ago














3












3








3








I was trying to lookup the versions of libdb in the debian archives with something like that:



$ aptitude search '~S~ndev$(~nlibdb~(d~|-~)!~v~rnative)'


which didn't work as expected so I changed the search pattern for 'digit or dash' to a (malformed?) bracket pattern



$ aptitude search '~S~ndev$(~nlibdb[[:digit:]-]!~v~rnative)'


which did the job.



Curious about the engine under the hood I tried backreferencing



$ aptitude search '~n~([[:digit:]]~)1>~rnative'


which also worked and led me to the conclusion that it must be GNU ERE.



So I have two questions now:




  1. Does aptitude use GNU EREs?

  2. Is there any way to get aptitude to accept PCREs?


I hope someone can clarify this for me.










share|improve this question














I was trying to lookup the versions of libdb in the debian archives with something like that:



$ aptitude search '~S~ndev$(~nlibdb~(d~|-~)!~v~rnative)'


which didn't work as expected so I changed the search pattern for 'digit or dash' to a (malformed?) bracket pattern



$ aptitude search '~S~ndev$(~nlibdb[[:digit:]-]!~v~rnative)'


which did the job.



Curious about the engine under the hood I tried backreferencing



$ aptitude search '~n~([[:digit:]]~)1>~rnative'


which also worked and led me to the conclusion that it must be GNU ERE.



So I have two questions now:




  1. Does aptitude use GNU EREs?

  2. Is there any way to get aptitude to accept PCREs?


I hope someone can clarify this for me.







regular-expression aptitude






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 29 '13 at 18:06









RogerRoger

162




162













  • Apparently aptitude does not understand character class d , but you could use [0-9] or [[:digit:]], instead.

    – jarno
    14 hours ago













  • What is tne meaning of $( ... ) in command?

    – jarno
    14 hours ago



















  • Apparently aptitude does not understand character class d , but you could use [0-9] or [[:digit:]], instead.

    – jarno
    14 hours ago













  • What is tne meaning of $( ... ) in command?

    – jarno
    14 hours ago

















Apparently aptitude does not understand character class d , but you could use [0-9] or [[:digit:]], instead.

– jarno
14 hours ago







Apparently aptitude does not understand character class d , but you could use [0-9] or [[:digit:]], instead.

– jarno
14 hours ago















What is tne meaning of $( ... ) in command?

– jarno
14 hours ago





What is tne meaning of $( ... ) in command?

– jarno
14 hours ago










2 Answers
2






active

oldest

votes


















1














Well, man aptitude is full of lines like this:




(see the section “Search Patterns” in the aptitude reference manual)




There is no such section in the man page on my Debian and nor could I find it in the info page (which just gave me the same man page). Searching google found this, which explains that




Most textual searches (for package names, descriptions, etc) are performed using case-insensitive regular expressions. This means that you must backslash-escape regular expression metacharacters [12] in searches (for instance, to find “g++”, you should use the pattern “g++”).



[12] Regular expression metacharacters include: “+”, “-”, “.”, “(”, “)”, “|”, “[”, “]”, “^”, “$”, and “?”. Note that some of these are also aptitude metacharacters, so if you want to type (for instance) a literal “|”, it must be double-escaped: “~|”.




And "Regular expressions" are a broken link to a page called tao_regexps.






share|improve this answer


























  • I know. The site you found is probably the best source out there. I use it often for a quick lookup of search patterns link. It's still vague on REs there. Anyway, thx for the reply.

    – Roger
    Aug 29 '13 at 19:49













  • @Roger you're welcome.Just so you know, the "standard" way of expressing thanks in the stack exchange network is to upvote an answer if it helped and accept it if it actually answers your question.

    – terdon
    Aug 29 '13 at 19:51






  • 1





    ps: on my system (mint/ubuntu) there's a copy of said site in /usr/share/doc/aptitude/README - I assume it's there on debian too

    – Roger
    Aug 29 '13 at 19:52











  • @Roger thanks, I did not know that. Oh and yes, that site is a little vague but there is nothing vague about BREs, just google "Basic Regular Expressions" or go through the gritty details here. They are one of the major known REGEX types and the one most commonly used by *nix programs.

    – terdon
    Aug 30 '13 at 2:33













  • Aptitude is not using POSIX Basic Regular Expressions. E.g '+' is not metacharacter in POSIX BRE, but is special in aptitudes patterns.

    – jarno
    14 hours ago



















0














What is wrong with:



aptitude search '?version(CURRENT) ^libdb[1-9] ! -'


As simple as possible and as complex as needed.



Best Regards






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f88747%2faptitude-regex-engine%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Well, man aptitude is full of lines like this:




    (see the section “Search Patterns” in the aptitude reference manual)




    There is no such section in the man page on my Debian and nor could I find it in the info page (which just gave me the same man page). Searching google found this, which explains that




    Most textual searches (for package names, descriptions, etc) are performed using case-insensitive regular expressions. This means that you must backslash-escape regular expression metacharacters [12] in searches (for instance, to find “g++”, you should use the pattern “g++”).



    [12] Regular expression metacharacters include: “+”, “-”, “.”, “(”, “)”, “|”, “[”, “]”, “^”, “$”, and “?”. Note that some of these are also aptitude metacharacters, so if you want to type (for instance) a literal “|”, it must be double-escaped: “~|”.




    And "Regular expressions" are a broken link to a page called tao_regexps.






    share|improve this answer


























    • I know. The site you found is probably the best source out there. I use it often for a quick lookup of search patterns link. It's still vague on REs there. Anyway, thx for the reply.

      – Roger
      Aug 29 '13 at 19:49













    • @Roger you're welcome.Just so you know, the "standard" way of expressing thanks in the stack exchange network is to upvote an answer if it helped and accept it if it actually answers your question.

      – terdon
      Aug 29 '13 at 19:51






    • 1





      ps: on my system (mint/ubuntu) there's a copy of said site in /usr/share/doc/aptitude/README - I assume it's there on debian too

      – Roger
      Aug 29 '13 at 19:52











    • @Roger thanks, I did not know that. Oh and yes, that site is a little vague but there is nothing vague about BREs, just google "Basic Regular Expressions" or go through the gritty details here. They are one of the major known REGEX types and the one most commonly used by *nix programs.

      – terdon
      Aug 30 '13 at 2:33













    • Aptitude is not using POSIX Basic Regular Expressions. E.g '+' is not metacharacter in POSIX BRE, but is special in aptitudes patterns.

      – jarno
      14 hours ago
















    1














    Well, man aptitude is full of lines like this:




    (see the section “Search Patterns” in the aptitude reference manual)




    There is no such section in the man page on my Debian and nor could I find it in the info page (which just gave me the same man page). Searching google found this, which explains that




    Most textual searches (for package names, descriptions, etc) are performed using case-insensitive regular expressions. This means that you must backslash-escape regular expression metacharacters [12] in searches (for instance, to find “g++”, you should use the pattern “g++”).



    [12] Regular expression metacharacters include: “+”, “-”, “.”, “(”, “)”, “|”, “[”, “]”, “^”, “$”, and “?”. Note that some of these are also aptitude metacharacters, so if you want to type (for instance) a literal “|”, it must be double-escaped: “~|”.




    And "Regular expressions" are a broken link to a page called tao_regexps.






    share|improve this answer


























    • I know. The site you found is probably the best source out there. I use it often for a quick lookup of search patterns link. It's still vague on REs there. Anyway, thx for the reply.

      – Roger
      Aug 29 '13 at 19:49













    • @Roger you're welcome.Just so you know, the "standard" way of expressing thanks in the stack exchange network is to upvote an answer if it helped and accept it if it actually answers your question.

      – terdon
      Aug 29 '13 at 19:51






    • 1





      ps: on my system (mint/ubuntu) there's a copy of said site in /usr/share/doc/aptitude/README - I assume it's there on debian too

      – Roger
      Aug 29 '13 at 19:52











    • @Roger thanks, I did not know that. Oh and yes, that site is a little vague but there is nothing vague about BREs, just google "Basic Regular Expressions" or go through the gritty details here. They are one of the major known REGEX types and the one most commonly used by *nix programs.

      – terdon
      Aug 30 '13 at 2:33













    • Aptitude is not using POSIX Basic Regular Expressions. E.g '+' is not metacharacter in POSIX BRE, but is special in aptitudes patterns.

      – jarno
      14 hours ago














    1












    1








    1







    Well, man aptitude is full of lines like this:




    (see the section “Search Patterns” in the aptitude reference manual)




    There is no such section in the man page on my Debian and nor could I find it in the info page (which just gave me the same man page). Searching google found this, which explains that




    Most textual searches (for package names, descriptions, etc) are performed using case-insensitive regular expressions. This means that you must backslash-escape regular expression metacharacters [12] in searches (for instance, to find “g++”, you should use the pattern “g++”).



    [12] Regular expression metacharacters include: “+”, “-”, “.”, “(”, “)”, “|”, “[”, “]”, “^”, “$”, and “?”. Note that some of these are also aptitude metacharacters, so if you want to type (for instance) a literal “|”, it must be double-escaped: “~|”.




    And "Regular expressions" are a broken link to a page called tao_regexps.






    share|improve this answer















    Well, man aptitude is full of lines like this:




    (see the section “Search Patterns” in the aptitude reference manual)




    There is no such section in the man page on my Debian and nor could I find it in the info page (which just gave me the same man page). Searching google found this, which explains that




    Most textual searches (for package names, descriptions, etc) are performed using case-insensitive regular expressions. This means that you must backslash-escape regular expression metacharacters [12] in searches (for instance, to find “g++”, you should use the pattern “g++”).



    [12] Regular expression metacharacters include: “+”, “-”, “.”, “(”, “)”, “|”, “[”, “]”, “^”, “$”, and “?”. Note that some of these are also aptitude metacharacters, so if you want to type (for instance) a literal “|”, it must be double-escaped: “~|”.




    And "Regular expressions" are a broken link to a page called tao_regexps.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 14 hours ago

























    answered Aug 29 '13 at 18:39









    terdonterdon

    134k33269449




    134k33269449













    • I know. The site you found is probably the best source out there. I use it often for a quick lookup of search patterns link. It's still vague on REs there. Anyway, thx for the reply.

      – Roger
      Aug 29 '13 at 19:49













    • @Roger you're welcome.Just so you know, the "standard" way of expressing thanks in the stack exchange network is to upvote an answer if it helped and accept it if it actually answers your question.

      – terdon
      Aug 29 '13 at 19:51






    • 1





      ps: on my system (mint/ubuntu) there's a copy of said site in /usr/share/doc/aptitude/README - I assume it's there on debian too

      – Roger
      Aug 29 '13 at 19:52











    • @Roger thanks, I did not know that. Oh and yes, that site is a little vague but there is nothing vague about BREs, just google "Basic Regular Expressions" or go through the gritty details here. They are one of the major known REGEX types and the one most commonly used by *nix programs.

      – terdon
      Aug 30 '13 at 2:33













    • Aptitude is not using POSIX Basic Regular Expressions. E.g '+' is not metacharacter in POSIX BRE, but is special in aptitudes patterns.

      – jarno
      14 hours ago



















    • I know. The site you found is probably the best source out there. I use it often for a quick lookup of search patterns link. It's still vague on REs there. Anyway, thx for the reply.

      – Roger
      Aug 29 '13 at 19:49













    • @Roger you're welcome.Just so you know, the "standard" way of expressing thanks in the stack exchange network is to upvote an answer if it helped and accept it if it actually answers your question.

      – terdon
      Aug 29 '13 at 19:51






    • 1





      ps: on my system (mint/ubuntu) there's a copy of said site in /usr/share/doc/aptitude/README - I assume it's there on debian too

      – Roger
      Aug 29 '13 at 19:52











    • @Roger thanks, I did not know that. Oh and yes, that site is a little vague but there is nothing vague about BREs, just google "Basic Regular Expressions" or go through the gritty details here. They are one of the major known REGEX types and the one most commonly used by *nix programs.

      – terdon
      Aug 30 '13 at 2:33













    • Aptitude is not using POSIX Basic Regular Expressions. E.g '+' is not metacharacter in POSIX BRE, but is special in aptitudes patterns.

      – jarno
      14 hours ago

















    I know. The site you found is probably the best source out there. I use it often for a quick lookup of search patterns link. It's still vague on REs there. Anyway, thx for the reply.

    – Roger
    Aug 29 '13 at 19:49







    I know. The site you found is probably the best source out there. I use it often for a quick lookup of search patterns link. It's still vague on REs there. Anyway, thx for the reply.

    – Roger
    Aug 29 '13 at 19:49















    @Roger you're welcome.Just so you know, the "standard" way of expressing thanks in the stack exchange network is to upvote an answer if it helped and accept it if it actually answers your question.

    – terdon
    Aug 29 '13 at 19:51





    @Roger you're welcome.Just so you know, the "standard" way of expressing thanks in the stack exchange network is to upvote an answer if it helped and accept it if it actually answers your question.

    – terdon
    Aug 29 '13 at 19:51




    1




    1





    ps: on my system (mint/ubuntu) there's a copy of said site in /usr/share/doc/aptitude/README - I assume it's there on debian too

    – Roger
    Aug 29 '13 at 19:52





    ps: on my system (mint/ubuntu) there's a copy of said site in /usr/share/doc/aptitude/README - I assume it's there on debian too

    – Roger
    Aug 29 '13 at 19:52













    @Roger thanks, I did not know that. Oh and yes, that site is a little vague but there is nothing vague about BREs, just google "Basic Regular Expressions" or go through the gritty details here. They are one of the major known REGEX types and the one most commonly used by *nix programs.

    – terdon
    Aug 30 '13 at 2:33







    @Roger thanks, I did not know that. Oh and yes, that site is a little vague but there is nothing vague about BREs, just google "Basic Regular Expressions" or go through the gritty details here. They are one of the major known REGEX types and the one most commonly used by *nix programs.

    – terdon
    Aug 30 '13 at 2:33















    Aptitude is not using POSIX Basic Regular Expressions. E.g '+' is not metacharacter in POSIX BRE, but is special in aptitudes patterns.

    – jarno
    14 hours ago





    Aptitude is not using POSIX Basic Regular Expressions. E.g '+' is not metacharacter in POSIX BRE, but is special in aptitudes patterns.

    – jarno
    14 hours ago













    0














    What is wrong with:



    aptitude search '?version(CURRENT) ^libdb[1-9] ! -'


    As simple as possible and as complex as needed.



    Best Regards






    share|improve this answer




























      0














      What is wrong with:



      aptitude search '?version(CURRENT) ^libdb[1-9] ! -'


      As simple as possible and as complex as needed.



      Best Regards






      share|improve this answer


























        0












        0








        0







        What is wrong with:



        aptitude search '?version(CURRENT) ^libdb[1-9] ! -'


        As simple as possible and as complex as needed.



        Best Regards






        share|improve this answer













        What is wrong with:



        aptitude search '?version(CURRENT) ^libdb[1-9] ! -'


        As simple as possible and as complex as needed.



        Best Regards







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 29 '17 at 8:15









        DevDev

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f88747%2faptitude-regex-engine%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

            The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

            Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...