🔥 | Latest

Beautiful, Community, and God: 21 Answers votes oldest newest You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool that is insufficiently sophisticated to understand the constructs employed by HTML. HTML is not a regular language and hence cannot be parsed by regular expressions. Regex queries are not equipped to break down HTML into its meaningful parts. so many times but it is not getting to me. Even enhanced irregular regular expressions as used by Perl are not up to the task of parsing HTML. You will never make me crack. HTML is a language of sufficient complexity that it cannot be parsed by regular expressions. Even Jon Skeet cannot parse HTML using regular expressions. Every time you attempt to parse HTML with regular expressions, the unholy child weeps the blood of virgins, and Russian hackers pwn your webapp. Parsing HTML with regex summons tainted souls into the realm of the living. HTML and regex go together like love, marriage, and ritual infanticide. The <center> cannot hold it is too late. The force of regex and HTML together in the same conceptual space will destroy your mind like so much watery putty. If you parse HTML with regex you are giving in to Them and their blasphemous ways which doom us all to inhuman toil for the One whose Name cannot be expressed in the Basic Multilingual Plane, he comes. HTML-plus-regexp will liquify the nerves of the sentient whilst you observe, your psyche withering in the onslaught of horror. Regex-based HTML parsers are the cancer that is killing StackOverflow it is too late it is too late we cannot be saved the trangession of a child ensures regex will consume all living tissue (except for HTML which it cannot, as previously prophesied) dear lord help us how can anyone survive this scourge using regex to parse HTML has doomed humanity to an eternity of dread torture and security holes using regex as a tool to process HTML establishes a breach between this world and the dread realm of čorrupt entities (like SGML entities, but more corrupt) a mere glimpse of the world of reg ex parsers for HTML will instantly transport a programmer's consciousness into a world of ceaseless screaming, he comes-the pestilent slithy regex-infection will devour your HTML parser, application and existence for all time like Vişual Basic only worse he comes he comes do not fight he comes, his uņholy radiance destroping all enlightenment, HTML tags leaking frọm your eyesiike liquid pain, the song of regular expression parsing-will extinguish the voices of mortal man from the sphere I can see it can you see t it is beautiful the f inal snuf fing of the lies of Man ALL ĮS LOSTALL IS LOST the pony he comes he comes hejcemes the ichor permeates al MY FACEFACEh god no NO NOOoo Ne stop the an ges aře not reâj ZALGO IS TON THË PONY, HECOMES 1811 Have you tried using an XML parser instead? link edit flag edited Nov 14 at 0:18 community wiki bobince regex and html
Beautiful, Community, and God: 21 Answers
 votes
 oldest
 newest
 You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that
 can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many
 times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool that is
 insufficiently sophisticated to understand the constructs employed by HTML. HTML is not a regular
 language and hence cannot be parsed by regular expressions. Regex queries are not equipped to break
 down HTML into its meaningful parts. so many times but it is not getting to me. Even enhanced irregular
 regular expressions as used by Perl are not up to the task of parsing HTML. You will never make me
 crack. HTML is a language of sufficient complexity that it cannot be parsed by regular expressions. Even
 Jon Skeet cannot parse HTML using regular expressions. Every time you attempt to parse HTML with
 regular expressions, the unholy child weeps the blood of virgins, and Russian hackers pwn your webapp.
 Parsing HTML with regex summons tainted souls into the realm of the living. HTML and regex go together
 like love, marriage, and ritual infanticide. The <center> cannot hold it is too late. The force of regex and
 HTML together in the same conceptual space will destroy your mind like so much watery putty. If you
 parse HTML with regex you are giving in to Them and their blasphemous ways which doom us all to
 inhuman toil for the One whose Name cannot be expressed in the Basic Multilingual Plane, he comes.
 HTML-plus-regexp will liquify the nerves of the sentient whilst you observe, your psyche withering in the
 onslaught of horror. Regex-based HTML parsers are the cancer that is killing StackOverflow it is too late
 it is too late we cannot be saved the trangession of a child ensures regex will consume all living tissue
 (except for HTML which it cannot, as previously prophesied) dear lord help us how can anyone survive
 this scourge using regex to parse HTML has doomed humanity to an eternity of dread torture and
 security holes using regex as a tool to process HTML establishes a breach between this world and the
 dread realm of čorrupt entities (like SGML entities, but more corrupt) a mere glimpse of the world of reg
 ex parsers for HTML will instantly transport a programmer's consciousness into a world of ceaseless
 screaming, he comes-the pestilent slithy regex-infection will devour your HTML parser, application and
 existence for all time like Vişual Basic only worse he comes he comes do not fight he comes, his uņholy
 radiance destroping all enlightenment, HTML tags leaking frọm your eyesiike liquid pain, the song of
 regular expression parsing-will extinguish the voices of mortal man from the sphere I can see it can you
 see t it is beautiful the f inal snuf fing of the lies of Man ALL ĮS LOSTALL IS LOST the pony he
 comes he comes hejcemes the ichor permeates al MY FACEFACEh god no NO NOOoo Ne
 stop the an ges aře not reâj ZALGO IS TON THË PONY, HECOMES
 1811
 Have you tried using an XML parser instead?
 link edit flag
 edited Nov 14 at 0:18
 community wiki
 bobince
regex and html

regex and html

Batman, Bitch, and Click: gotham city by meg INT. WAREHOUSE NIGHT The discordant SCREECH of a wooden chair's being dragged across a concrete floor echoes through the spacious yet deserted warehouse. The tinted lights are dim, some flickering without any discernible pattern. A heavy pair of boots stomp rhythmically as an man makes his way across the room, the chair firmly in his grip. The man, a nameless HENCHMAN type, is who someone with manners would refer to as "burly" or "built." He stops underneath the brightest light in the room, setting the chair down and revealing its occupant. He is wearing a golden "RR" symbol decorating his chest. Despite the sack covering his features, one can still make out his raven hair poking out of the burlap fabric. a uniform of sorts, with black and red details plus HENCHMAN (gruff) Seems like the Batman... is losing his touch RED ROBIN's head twitches underneath the sack. RED ROBIN (muffled) Do I look like Batman to you? The henchman circles the teen like a tiger stalking its prey, if that tiger had one too many antelope dinners. He forces out a deep and planned LAUGH HENCHMAN No, no, no. Much too small, you are Red Robin shifts in his seat. Inaudible muffling can be heard from underneath the sack. HENCHMAN (CONT'D) Shhh, little bird. You must save your breath! Air will get spare quite soon. Henchman LAUGHS again, but this time his voice horribly cracks. He COUGHS quickly, but the damage was done. Red Robin shifts in his seat once more in the following uncomfortable silence. HENCHMAN (CONT'D) So tell me- 2. Henchman tries to restore the tense atmosphere by slipping an obnoxiously sized syringe full of mysterious liquid out of a package hidden in his coat pocket. HENCHMAN (CONT'D) Where is the bat? My employer just wants to... chat. Red Robin drops his head to the side, effectively communicating a "bitch, please" without the spoken word. Henchman menacingly shakes his head as he stalks toward the teen HENCHMAN (CONT'D) I had a feeling you were the dumb robin A voice suddenly cuts through the heavy air. RED HOOD (from above) Damn right! The man drops the syringe in surprise, eliciting CRASH Red Robin perks up at the dialogue, using the hand that was supposedly tied to the splintering wooden chair to lift the sack from his head. a horrid RED ROBIN (yelling) I resent that! More bickering voices start to emerge from the darkened catwalk above the factory floor. The henchman stands stunned SPOILER Hey, don't say that! sensitive. He's ROBIN Weakest Robin, maybe. Getting himself kidnapped by this oaf? Disgraceful RED ROBIN (yelling) We literally planned this! It was your idea! Red Robin starts untying the ropes around his ankles. 3. ROBIN Maybe there's a reason you're always playing kidnapped! RED ROBIN (yelling) Because you guys are jerks? NIGHTWING Hey, I volunteered to be kidnapped this time! BATGIRL Oh, honey. We all know how that would play out. A communal GROAN emits from the batkids as they reminisce on the last time Dick volunteered to play kidnapped. RED HOOD I take it back, Wing's the dumb Robin NIGHTWING OKAY, first of all, not my fault- the fire was The batkids devolve into unintelligible BICKERING. To an outside observer, it would seem as Red Robin is yelling into darkness filled with disembodied voices. Henchman SPUTTERS, unable to form coherent words. HENCHMAN H-hey! You- You can't- ALL BATKIDS (yelling) Shut up! The henchman shuts his gaping mouth with the CLICK of his teeth HENCHΜΑΝ (talking to himself) I 'm not getting out of this, am 1? A pair of white eyes cut through the darkness behind him ΒΑΤΜAΝ No outoftheframework: outoftheframework: so a little fun tidbit about me is that i write screenplays. i challenged myself to write one in fifteen minutes, unedited, and then post it. this is what happened. enjoy? so so so thankful and in awe to the response to this post. I love screenwriting and it would be my pleasure to provide you guys with more high quality work in the future, y’all make me so happy.thank you :)
Batman, Bitch, and Click: gotham city
 by
 meg

 INT. WAREHOUSE
 NIGHT
 The discordant SCREECH of a wooden chair's being dragged
 across a concrete floor echoes through the spacious yet
 deserted warehouse. The tinted lights are dim, some
 flickering without any discernible pattern. A heavy pair of
 boots stomp rhythmically as an man makes his way across the
 room, the chair firmly in his grip. The man, a nameless
 HENCHMAN type, is who someone with manners would refer to
 as "burly" or "built."
 He stops underneath the brightest light in the room,
 setting the chair down and revealing its occupant. He is
 wearing
 a golden "RR" symbol decorating his chest. Despite the sack
 covering his features, one can still make out his raven
 hair poking out of the burlap fabric.
 a uniform of sorts, with black and red details plus
 HENCHMAN
 (gruff)
 Seems like the Batman... is losing
 his touch
 RED ROBIN's head twitches underneath the sack.
 RED ROBIN
 (muffled)
 Do I look like Batman to you?
 The henchman circles the teen like a
 tiger stalking its
 prey, if that tiger had one too many antelope dinners. He
 forces out a deep and planned LAUGH
 HENCHMAN
 No, no, no. Much too small, you
 are
 Red Robin shifts in his seat. Inaudible muffling can be
 heard from underneath the sack.
 HENCHMAN (CONT'D)
 Shhh, little bird. You must save
 your breath! Air will get spare
 quite soon.
 Henchman LAUGHS again, but this time his voice horribly
 cracks. He COUGHS quickly, but the damage was done. Red
 Robin shifts in his seat once more in the following
 uncomfortable silence.
 HENCHMAN (CONT'D)
 So tell me-

 2.
 Henchman tries to restore the tense atmosphere by slipping
 an obnoxiously sized syringe full of mysterious liquid out
 of a package hidden in his coat pocket.
 HENCHMAN (CONT'D)
 Where is the bat? My employer just
 wants to... chat.
 Red Robin drops his head to the side, effectively
 communicating
 a "bitch, please" without the spoken word.
 Henchman menacingly shakes his head as he stalks toward the
 teen
 HENCHMAN (CONT'D)
 I had a feeling you were the dumb
 robin
 A voice suddenly cuts through the heavy air.
 RED HOOD
 (from above)
 Damn right!
 The man drops the syringe in surprise, eliciting
 CRASH Red Robin perks up at the dialogue, using the hand
 that was supposedly tied to the splintering wooden chair to
 lift the sack from his head.
 a horrid
 RED ROBIN
 (yelling)
 I resent that!
 More bickering voices start to emerge from the darkened
 catwalk above the factory floor. The henchman stands
 stunned
 SPOILER
 Hey, don't say that!
 sensitive.
 He's
 ROBIN
 Weakest Robin, maybe. Getting
 himself kidnapped by this oaf?
 Disgraceful
 RED ROBIN
 (yelling)
 We literally planned this! It was
 your idea!
 Red Robin starts untying the ropes around his ankles.

 3.
 ROBIN
 Maybe there's a reason you're
 always playing kidnapped!
 RED ROBIN
 (yelling)
 Because you guys are
 jerks?
 NIGHTWING
 Hey, I volunteered to be kidnapped
 this time!
 BATGIRL
 Oh, honey. We all know how that
 would play out.
 A communal GROAN emits from the batkids as they reminisce
 on the last time Dick volunteered to play kidnapped.
 RED HOOD
 I take it back, Wing's the dumb
 Robin
 NIGHTWING
 OKAY, first of all,
 not my fault-
 the fire was
 The batkids devolve into unintelligible BICKERING. To an
 outside observer, it would seem as Red Robin is yelling
 into darkness filled with disembodied voices.
 Henchman SPUTTERS, unable to form coherent words.
 HENCHMAN
 H-hey! You- You can't-
 ALL BATKIDS
 (yelling)
 Shut up!
 The henchman shuts his gaping mouth with the CLICK of his
 teeth
 HENCHΜΑΝ
 (talking to himself)
 I 'm not getting out of this, am 1?
 A pair of white eyes cut through the darkness behind him
 ΒΑΤΜAΝ
 No
outoftheframework:

outoftheframework:
so a little fun tidbit about me is that i write screenplays. i challenged myself to write one in fifteen minutes, unedited, and then post it. this is what happened.

enjoy?

so so so thankful and in awe to the response to this post. I love screenwriting and it would be my pleasure to provide you guys with more high quality work in the future, y’all make me so happy.thank you :)

outoftheframework: outoftheframework: so a little fun tidbit about me is that i write screenplays. i challenged myself to write one in fift...