Spam for breakfast

Had nineteen attempts last night.

One with the multiple hijacked forums. I am predicting that this will die off fairly soon as this one had 23 different listings and none of them were new.

One was the conversational type with the single URL.

The other seventeen were the random six characters followed by a couple gibberish URLs. That little snippet of regex I posted yesterday nails these to the wall.

Of the nineteen attempts, none of them were successful. Zip Zero. Nada.

For a fun post/rant on regex, check out Sleestacks -- The Rant:

The Trouble With Regular Expressions
I have this problem with regular expressions. They're too handy for their own good. You say you don't know what a regular expression is? Well, let me just tell you, you don't know what you're missing out on. Think of it like a really super-duper complicated way of searching for something real specific when it's slapped in the middle of a whole back of other crap you don't want to even mess with. But it's not even just searching for something, you can search and replace really complicated text that's just too big to do by hand.

More than that, it's not like you just want to find every reference to the name "Meg" on your computer and change it to "Poop" -- you can use regular expressions to transform Huge Text File (A) into just the little sub-sections of important stuff -- or you can convert (A) from one textual format to another, like from HTML to Whiskey, or whatever the hell new-fangled nonsense is going on out there in web junky land.

There are plenty of programs out there that make use of regular expressions and you don't even know about it. I first started playing around with them way back in 1995 or so, not long after Rich Siegel started selling BBEdit for Macintosh, and I've been using them since. Here's an example - say you have a text file that looks like this:
Jimmy Jack Johnson sells 43 seashells to Yo Momma. She paid about three-fiddy.
You can do a regular expression find/replace on that text, which would look something like this:
's/^(J.*)\ J.*\ (J.*)\ (s)...s\ ([0-9]+).*\r/\1\ sucks\ \4\ \2\3\.\r/g'
Which would now make that first text look something like this:
Jimmy sucks 43 Johnsons.

Heh... If regex looks obscure, its because it is. One of the steepest learning curves I have ever experienced but one of the most useful things to know.

October 2022

Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          

Environment and Climate
AccuWeather
Cliff Mass Weather Blog
Climate Depot
Ice Age Now
ICECAP
Jennifer Marohasy
Solar Cycle 24
Space Weather
Watts Up With That?


Science and Medicine
Junk Science
Life in the Fast Lane
Luboš Motl
Medgadget
Next Big Future
PhysOrg.com


Geek Stuff
Ars Technica
Boing Boing
Don Lancaster's Guru's Lair
Evil Mad Scientist Laboratories
FAIL Blog
Hack a Day
Kevin Kelly - Cool Tools
Neatorama
Slashdot: News for nerds
The Register
The Daily WTF


Comics
Achewood
The Argyle Sweater
Chip Bok
Broadside Cartoons
Day by Day
Dilbert
Medium Large
Michael Ramirez
Prickly City
Tundra
User Friendly
Vexarr
What The Duck
Wondermark
xkcd


NO WAI! WTF?¿?¿
Awkward Family Photos
Cake Wrecks
Not Always Right
Sober in a Nightclub
You Drive What?


Business and Economics
The Austrian Economists
Carpe Diem
Coyote Blog


Photography and Art
Digital Photography Review
DIYPhotography
James Gurney
Joe McNally's Blog
PetaPixel
photo.net
Shorpy
Strobist
The Online Photographer


Blogrolling
A Western Heart
AMCGLTD.COM
American Digest
The AnarchAngel
Anti-Idiotarian Rottweiler
Babalu Blog
Belmont Club
Bayou Renaissance Man
Classical Values
Cobb
Cold Fury
David Limbaugh
Defense Technology
Doug Ross @ Journal
Grouchy Old Cripple
Instapundit
iowahawk
Irons in the Fire
James Lileks
Lowering the Bar
Maggie's Farm
Marginal Revolution
Michael J. Totten
Mostly Cajun
Neanderpundit
neo-neocon
Power Line
ProfessorBainbridge.com
Questions and Observations
Rachel Lucas
Roger L. Simon
Samizdata.net
Sense of Events
Sound Politics
The Strata-Sphere
The Smallest Minority
The Volokh Conspiracy
Tim Blair
Velociworld
Weasel Zippers
WILLisms.com
Wizbang


Gone but not Forgotten...
A Coyote at the Dog Show
Bad Eagle
Steven DenBeste
democrats give conservatives indigestion
Allah
BigPictureSmallOffice
Cox and Forkum
The Diplomad
Priorities & Frivolities
Gut Rumbles
Mean Mr. Mustard 2.0
MegaPundit
Masamune
Neptunus Lex
Other Side of Kim
Publicola
Ramblings' Journal
Sgt. Stryker
shining full plate and a good broadsword
A Physicist's Perspective
The Daily Demarche
Wayne's Online Newsletter

About this Entry

This page contains a single entry by DaveH published on May 26, 2009 10:38 AM.

Damien Walters was the previous entry in this blog.

Heh - and the winner is... is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.2.9