For this week’s installment of some A-Z fun, we were assigned to work with regular expressions for text parsing analysis. I chose to work with subject lines generated from the itp student listserv. It is very popular to preface a subject line with a tag in square brackets as a meta-subject, i.e. [JOB] or [looking for], so I chose to use this data for some mixing. I wrote a python program to go through some of my list emails, (to be precise, 2000) and if they were [tagged] to extract the tag, and if not, to extract the subject line. As an output, the program generates twenty new re-contextualized hypothetical posts. Three regular expressions are used:
'^To:.*itp-students@lists\.nyu\.edu' filters emails to the list,
'^Subject: (.*)' grabs the subject, and
'\[(.+?)\]‘ grabs the [tag] if one exists (
+? is a non-greedy quantifier).
Here is the first output:
[MIT] Bikers,Drivers,Walkers,Skateboarders - We want to ask you a question…
[continuous city] Re: part time VS full time II
[continuous city] Re: DDR on the floor… for a bit
[QNYF] Re: What’s in YOUR locket?
[lost mouse] Re: Trying something new…
[mcc-talk] Re: Honestly, Do I Really Have to Wipe Your Piss Off the Toilet Seat?
[bludgeon yer eyes] we are ordering food
[sorry that was for Ari] Re: samba music?
[Prop 8] Re: re-do TEXAS BARBECUE Sunday @ 8 pm!
[thesis] Thanksgiving sublet
[Resource] Re: Left my headphones…
[BOOK PUBLISHING] INTERN: Hotlist Media PAID internship - CSS/AJAX Interface Designer
[CLASS] Re: Favorite TED talks?
[cash + tech] Re: TNO needs your help!
[cash + tech] Re: thesis idea?
[glass/wine bottles] 2nd Annual Sandwich Open
[first-year question] Re: I for one welcome our new Google overlords
[Thanks a lot] more on Prop 8
[Resource] Re: i h8 flash
[recommendations] Re: order pizza via TiVo
Let’s show one more run for good measure:
[dreamweaver question] Re: Barack is asking me for money!!!!!!!
[want to buy] Fwd: Mad Men behind the scenes?
[eclipse] CALL: Sound and Music Computing Conference 2009
[help] Re: JOB: Immediate Special ny state senate project.
[BIG SCREENS] Re: For those who went to the DriveBy
[redslist] Re: Sarah Palin qualified?
[thesis] Service Design for Public Space. Any 2nd yrs take this before?
[film shoot] Re: thanks
[politics/glbt] Re: Anti-Bailout Rally on Wall St &Democracy in America at the Armory
[CONEY ISLAND] Re: Good registrar?
[buy] Re: mechanisms and things that move?
[techart] Re: 4in4 livestream
[concerts] Re: Plexi needed.
[ PERFORMANCE ] Windows?
[Ladies Lotto] Re: What’s up with facilitating?
[Screen Shots on my Mac] What is the largest portal site in your country? (Asia)
[TOWN HALL] Countdown to the show.
[GAMING DEGREE] Re: Fuck Flickr
[ happy birthday ] Re: I wonder how many of us are awake now….
[prog-board-events] Re: The softness of things…