Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. The Greatest Answer in the History of StackOverflow?

The Greatest Answer in the History of StackOverflow?

Scheduled Pinned Locked Moved The Lounge
regexquestioncomtutorial
27 Posts 19 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    I like the answer one below....

    Quote:

    While it is true that asking regexes to parse arbitrary HTML is like asking Paris Hilton to write an operating system, it's sometimes appropriate to parse a limited, known set of HTML.

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #16

    Probably referring to the new Microsoft Paris Hilton Lens, written entirely in Microsoft new language PH#.

    How do you know so much about swallows? Well, you have to know these things when you're a king, you know.

    S 1 Reply Last reply
    0
    • K Kenneth Haugland

      Picture/Video or it didn't happen ;P

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #17

      No! Please, for gawd sake NO!

      Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      • R realJSOP

        //
        // Dear maintainer:
        //
        // Once you are done trying to 'optimize' this routine,
        // and have realized what a terrible mistake that was,
        // please increment the following counter as a warning
        // to the next guy:
        //
        // total_hours_wasted_here = 42
        //

        F*ckin outstanding. :)

        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
        -----
        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
        -----
        When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

        B Offline
        B Offline
        Brisingr Aerowing
        wrote on last edited by
        #18

        I know of a lot of code that could use that.

        What do you get when you cross a joke with a rhetorical question? --- The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. --- Do questions with multiple question marks annoy you???

        1 Reply Last reply
        0
        • B Brisingr Aerowing

          This one[^] (First code block)

          What do you get when you cross a joke with a rhetorical question? --- The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. --- Do questions with multiple question marks annoy you???

          A Offline
          A Offline
          Alexander DiMauro
          wrote on last edited by
          #19

          Rickrolled!

          I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone - Bjarne Stroustrup The world is going to laugh at you anyway, might as well crack the 1st joke! My code has no bugs, it runs exactly as it was written.

          1 Reply Last reply
          0
          • V V 0

            I dunno, maybe Chuck Norris could have a crack at it ;P

            V.
            (MQOTD rules and previous solutions)

            Q Offline
            Q Offline
            Quirkafleeg
            wrote on last edited by
            #20

            This guy would probably delegate him to do it: :) Peter C.

            1 Reply Last reply
            0
            • L Lost User

              Probably referring to the new Microsoft Paris Hilton Lens, written entirely in Microsoft new language PH#.

              How do you know so much about swallows? Well, you have to know these things when you're a king, you know.

              S Offline
              S Offline
              SortaCore
              wrote on last edited by
              #21

              Visual PH# Studio 2015 SP3 to be released with three editions: Ultimate, Professional, and Express[ly Irritating].

              U 1 Reply Last reply
              0
              • V V 0

                I dunno, maybe Chuck Norris could have a crack at it ;P

                V.
                (MQOTD rules and previous solutions)

                F Offline
                F Offline
                Freak30
                wrote on last edited by
                #22

                It was already mentioned in the comments. "Chuck Norris doesn't parse HTML. When he shows up it parses itself."

                The good thing about pessimism is, that you are always either right or pleasently surprised.

                1 Reply Last reply
                0
                • A Alexander DiMauro

                  There is probably a good chance this was posted here before, since it's from 5 years ago, but, I'm a little slow and just found this today from a link on Twitter. Read the accepted answer for this question. Read the whole thing, it's brilliant! http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags[^] Any other great answers out there that people know of?

                  I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone - Bjarne Stroustrup My code has no bugs, it runs exactly as it was written.

                  D Offline
                  D Offline
                  Dan Neely
                  wrote on last edited by
                  #23

                  Quote: @Kent-Sharkey

                  Now we need a collection from CP

                  First someone needs to figure out how to make non-article content her visible over the long term. CP's forum archives have been invisible to Google for as long as I can remember (probably because performance is(was?) appalling); and I've never seen a QA when I Google something.

                  Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                  1 Reply Last reply
                  0
                  • A Alexander DiMauro

                    There is probably a good chance this was posted here before, since it's from 5 years ago, but, I'm a little slow and just found this today from a link on Twitter. Read the accepted answer for this question. Read the whole thing, it's brilliant! http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags[^] Any other great answers out there that people know of?

                    I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone - Bjarne Stroustrup My code has no bugs, it runs exactly as it was written.

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #24

                    I wish to answer by similar way to classic C "How to convert hex to binary" question.

                    1 Reply Last reply
                    0
                    • L Lost User

                      Alexander Yee's explanation of why processing a sorted array is faster[^] (well, in that case). Not because it has many upvotes or even because I learned something from it (I didn't), but because it's one of those things that no one seems to know about but are very important anyway, and that answer makes it accessible to those people.

                      J Offline
                      J Offline
                      Jose Ernesto Lara Rodriguez
                      wrote on last edited by
                      #25

                      Oh, I love that answer. Indeed, it's something kind of obscure and many people (like me) never suspected it, however it makes a tremendous impact on execution speed. And it's a very complicated issue explained in very simple words. Simply brilliant.

                      Sore wa ore no nindo da!

                      1 Reply Last reply
                      0
                      • S SortaCore

                        Visual PH# Studio 2015 SP3 to be released with three editions: Ultimate, Professional, and Express[ly Irritating].

                        U Offline
                        U Offline
                        User 10300468
                        wrote on last edited by
                        #26

                        PH#, it's pronounced: Pee Ache Ow! I cut myself!

                        1 Reply Last reply
                        0
                        • R realJSOP

                          //
                          // Dear maintainer:
                          //
                          // Once you are done trying to 'optimize' this routine,
                          // and have realized what a terrible mistake that was,
                          // please increment the following counter as a warning
                          // to the next guy:
                          //
                          // total_hours_wasted_here = 42
                          //

                          F*ckin outstanding. :)

                          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                          -----
                          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                          -----
                          When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                          K Offline
                          K Offline
                          Kirk 10389821
                          wrote on last edited by
                          #27

                          I have to admit, I started to look for the code JUST to see if I could optimize it :-)))) I think I have a character flaw!

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups