How to match this URL with PERL REGEX in SQUID? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Come Celebrate our 10 Year Anniversary!RegEx Match URL Patternperl remove two slashes regexPerl regex expressionHow to print regex matchnginx location regex match everything but homeRegex - match third number before a characterFail2Ban regex to match these lines?Postfix Header_Check Regex 'Does Not Match' issueCan LocationMatch Regex match Query String portion?Changing url with sub_filter and regex

ListPlot join points by nearest neighbor rather than order

How do I stop a creek from eroding my steep embankment?

Is a manifold-with-boundary with given interior and non-empty boundary essentially unique?

Why does Python start at index 1 when iterating an array backwards?

Bonus calculation: Am I making a mountain out of a molehill?

Why is there no army of Iron-Mans in the MCU?

Is high blood pressure ever a symptom attributable solely to dehydration?

How does cp -a work

What do you call a plan that's an alternative plan in case your initial plan fails?

How to recreate this effect in Photoshop?

Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?

Compressing georeferenced images

Gastric acid as a weapon

Is there a concise way to say "all of the X, one of each"?

How to assign captions for two tables in LaTeX?

Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?

Do I really need recursive chmod to restrict access to a folder?

Is there a documented rationale why the House Ways and Means chairman can demand tax info?

Area of a 2D convex hull

Does the Giant Rocktopus have a Swim Speed?

How can I fade player when goes inside or outside of the area?

Precipitating silver(I) salts from the solution of barium(II) cyanate and iodide

Why there are no cargo aircraft with "flying wing" design?

How discoverable are IPv6 addresses and AAAA names by potential attackers?



How to match this URL with PERL REGEX in SQUID?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!RegEx Match URL Patternperl remove two slashes regexPerl regex expressionHow to print regex matchnginx location regex match everything but homeRegex - match third number before a characterFail2Ban regex to match these lines?Postfix Header_Check Regex 'Does Not Match' issueCan LocationMatch Regex match Query String portion?Changing url with sub_filter and regex



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am trying to match this URL but Its not working not matching at all ...



http://s48.turbobit.ru:9004/download.php?name=ATB+and+Armin+van+Buuren+-+Vice+Versa+%5Bworld-clubmusic.org%5D.mp3&md5=5aae327bd2fd7c176abf83474c5f8d69&fid=3spaskqfjxkm&uid=free&speed=55&till=1308055293&ip=84.22.91.71&trycount=1&sid=1a949a12128a9d1b9eb73ea2cba92f6a&browser=af8b7ed34111ff0bf53e39aff5bb1ad1&did=288302003&sign=f5f8344a2a456c4e53ab19616e123fb0


My Code is wrong but can somebody correct it for me ?



if (($u =~ /turbobit/) && (m/^http://(([A-Za-z]+[0-9-.]+)*?)([a-z]*.[^/]3/[a-z]*/[0-9]*)/(.*?)/([^/?&]4,)$/)) 
print $x . "http://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . "n";



I want to store rewrite the uRL into :



http://cdn.turbobit.net/name=ATB+and+Armin+van+Buuren+-+Vice+Versa+%5Bworld-clubmusic.org%5D.mp3


I know It must work in other way like we can put (name=*?) into an element and then we can use it !










share|improve this question






























    0















    I am trying to match this URL but Its not working not matching at all ...



    http://s48.turbobit.ru:9004/download.php?name=ATB+and+Armin+van+Buuren+-+Vice+Versa+%5Bworld-clubmusic.org%5D.mp3&md5=5aae327bd2fd7c176abf83474c5f8d69&fid=3spaskqfjxkm&uid=free&speed=55&till=1308055293&ip=84.22.91.71&trycount=1&sid=1a949a12128a9d1b9eb73ea2cba92f6a&browser=af8b7ed34111ff0bf53e39aff5bb1ad1&did=288302003&sign=f5f8344a2a456c4e53ab19616e123fb0


    My Code is wrong but can somebody correct it for me ?



    if (($u =~ /turbobit/) && (m/^http://(([A-Za-z]+[0-9-.]+)*?)([a-z]*.[^/]3/[a-z]*/[0-9]*)/(.*?)/([^/?&]4,)$/)) 
    print $x . "http://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . "n";



    I want to store rewrite the uRL into :



    http://cdn.turbobit.net/name=ATB+and+Armin+van+Buuren+-+Vice+Versa+%5Bworld-clubmusic.org%5D.mp3


    I know It must work in other way like we can put (name=*?) into an element and then we can use it !










    share|improve this question


























      0












      0








      0








      I am trying to match this URL but Its not working not matching at all ...



      http://s48.turbobit.ru:9004/download.php?name=ATB+and+Armin+van+Buuren+-+Vice+Versa+%5Bworld-clubmusic.org%5D.mp3&md5=5aae327bd2fd7c176abf83474c5f8d69&fid=3spaskqfjxkm&uid=free&speed=55&till=1308055293&ip=84.22.91.71&trycount=1&sid=1a949a12128a9d1b9eb73ea2cba92f6a&browser=af8b7ed34111ff0bf53e39aff5bb1ad1&did=288302003&sign=f5f8344a2a456c4e53ab19616e123fb0


      My Code is wrong but can somebody correct it for me ?



      if (($u =~ /turbobit/) && (m/^http://(([A-Za-z]+[0-9-.]+)*?)([a-z]*.[^/]3/[a-z]*/[0-9]*)/(.*?)/([^/?&]4,)$/)) 
      print $x . "http://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . "n";



      I want to store rewrite the uRL into :



      http://cdn.turbobit.net/name=ATB+and+Armin+van+Buuren+-+Vice+Versa+%5Bworld-clubmusic.org%5D.mp3


      I know It must work in other way like we can put (name=*?) into an element and then we can use it !










      share|improve this question
















      I am trying to match this URL but Its not working not matching at all ...



      http://s48.turbobit.ru:9004/download.php?name=ATB+and+Armin+van+Buuren+-+Vice+Versa+%5Bworld-clubmusic.org%5D.mp3&md5=5aae327bd2fd7c176abf83474c5f8d69&fid=3spaskqfjxkm&uid=free&speed=55&till=1308055293&ip=84.22.91.71&trycount=1&sid=1a949a12128a9d1b9eb73ea2cba92f6a&browser=af8b7ed34111ff0bf53e39aff5bb1ad1&did=288302003&sign=f5f8344a2a456c4e53ab19616e123fb0


      My Code is wrong but can somebody correct it for me ?



      if (($u =~ /turbobit/) && (m/^http://(([A-Za-z]+[0-9-.]+)*?)([a-z]*.[^/]3/[a-z]*/[0-9]*)/(.*?)/([^/?&]4,)$/)) 
      print $x . "http://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . "n";



      I want to store rewrite the uRL into :



      http://cdn.turbobit.net/name=ATB+and+Armin+van+Buuren+-+Vice+Versa+%5Bworld-clubmusic.org%5D.mp3


      I know It must work in other way like we can put (name=*?) into an element and then we can use it !







      regex






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 14 '11 at 12:27









      SmallClanger

      7,80912443




      7,80912443










      asked Jun 14 '11 at 11:07









      GhassanGhassan

      11




      11




















          1 Answer
          1






          active

          oldest

          votes


















          0














          It's not quite clear what you're trying to match here, as your regex implies you're trying to match more generally than your conditional and examples seem to indicate. I'm going to assume for the sake of my answer that you're looking for stuff coming from any subdomain of turbobit (under any TLD, any port) served by /download.php with a name parameter set.




          # unless you really just want to match anything with turbobit in the url
          # you should do this more explicitly
          if ($u =~ m,http://(?:[^/]+.)?turbobit.[^/]+/,)
          # this conditional will be clearer if you break it up

          # we're using the non-capture notation for most of these because it didn't
          # look like you were actually using this data.
          if ($u =~ m,^http://(?:[A-Za-z]+[0-9-]+.)?turbobit.[^/:]+(?::d+)?/download.php.*[?&]name=([^&]+),)
          my $name = $1;

          # you can use the concatenate operator, but why not just interpolate?
          print "$xhttp://cdn.turbobit.net/SQUIDINTERNAL/name=$namen";







          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "2"
            ;
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fserverfault.com%2fquestions%2f280250%2fhow-to-match-this-url-with-perl-regex-in-squid%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            It's not quite clear what you're trying to match here, as your regex implies you're trying to match more generally than your conditional and examples seem to indicate. I'm going to assume for the sake of my answer that you're looking for stuff coming from any subdomain of turbobit (under any TLD, any port) served by /download.php with a name parameter set.




            # unless you really just want to match anything with turbobit in the url
            # you should do this more explicitly
            if ($u =~ m,http://(?:[^/]+.)?turbobit.[^/]+/,)
            # this conditional will be clearer if you break it up

            # we're using the non-capture notation for most of these because it didn't
            # look like you were actually using this data.
            if ($u =~ m,^http://(?:[A-Za-z]+[0-9-]+.)?turbobit.[^/:]+(?::d+)?/download.php.*[?&]name=([^&]+),)
            my $name = $1;

            # you can use the concatenate operator, but why not just interpolate?
            print "$xhttp://cdn.turbobit.net/SQUIDINTERNAL/name=$namen";







            share|improve this answer



























              0














              It's not quite clear what you're trying to match here, as your regex implies you're trying to match more generally than your conditional and examples seem to indicate. I'm going to assume for the sake of my answer that you're looking for stuff coming from any subdomain of turbobit (under any TLD, any port) served by /download.php with a name parameter set.




              # unless you really just want to match anything with turbobit in the url
              # you should do this more explicitly
              if ($u =~ m,http://(?:[^/]+.)?turbobit.[^/]+/,)
              # this conditional will be clearer if you break it up

              # we're using the non-capture notation for most of these because it didn't
              # look like you were actually using this data.
              if ($u =~ m,^http://(?:[A-Za-z]+[0-9-]+.)?turbobit.[^/:]+(?::d+)?/download.php.*[?&]name=([^&]+),)
              my $name = $1;

              # you can use the concatenate operator, but why not just interpolate?
              print "$xhttp://cdn.turbobit.net/SQUIDINTERNAL/name=$namen";







              share|improve this answer

























                0












                0








                0







                It's not quite clear what you're trying to match here, as your regex implies you're trying to match more generally than your conditional and examples seem to indicate. I'm going to assume for the sake of my answer that you're looking for stuff coming from any subdomain of turbobit (under any TLD, any port) served by /download.php with a name parameter set.




                # unless you really just want to match anything with turbobit in the url
                # you should do this more explicitly
                if ($u =~ m,http://(?:[^/]+.)?turbobit.[^/]+/,)
                # this conditional will be clearer if you break it up

                # we're using the non-capture notation for most of these because it didn't
                # look like you were actually using this data.
                if ($u =~ m,^http://(?:[A-Za-z]+[0-9-]+.)?turbobit.[^/:]+(?::d+)?/download.php.*[?&]name=([^&]+),)
                my $name = $1;

                # you can use the concatenate operator, but why not just interpolate?
                print "$xhttp://cdn.turbobit.net/SQUIDINTERNAL/name=$namen";







                share|improve this answer













                It's not quite clear what you're trying to match here, as your regex implies you're trying to match more generally than your conditional and examples seem to indicate. I'm going to assume for the sake of my answer that you're looking for stuff coming from any subdomain of turbobit (under any TLD, any port) served by /download.php with a name parameter set.




                # unless you really just want to match anything with turbobit in the url
                # you should do this more explicitly
                if ($u =~ m,http://(?:[^/]+.)?turbobit.[^/]+/,)
                # this conditional will be clearer if you break it up

                # we're using the non-capture notation for most of these because it didn't
                # look like you were actually using this data.
                if ($u =~ m,^http://(?:[A-Za-z]+[0-9-]+.)?turbobit.[^/:]+(?::d+)?/download.php.*[?&]name=([^&]+),)
                my $name = $1;

                # you can use the concatenate operator, but why not just interpolate?
                print "$xhttp://cdn.turbobit.net/SQUIDINTERNAL/name=$namen";








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 2 '11 at 14:39









                markmark

                2,1851010




                2,1851010



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Server Fault!


                    • 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%2fserverfault.com%2fquestions%2f280250%2fhow-to-match-this-url-with-perl-regex-in-squid%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

                    How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

                    What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

                    Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos