addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Intro to Regular Expressions

  • Jan 16, 2013 · 7:00 PM
  • This location is shown only to members

Let's start off the new year becoming friends with regular expressions. The nights agenda:

  1. short overview of regular expressions
  2. practice some common regexps by doing a few exercises
  3. work on a python application using regexps to help us analyze some real world data

BEFORE YOU ARRIVE:

Please try to have the following 2 items installed:

  • Python:

To check if you have python installed, type the following in the terminal / command prompt:

python --version

If not, download v2.7.3 from http://wiki.python.org/moin/BeginnersGuide/Download

  • VIM:

To check if you have VIM installed, type the following in the terminal / command prompt:

vim --version

If not, download the latest version from http://www.vim.org/download.php

If you feel as scared/worried as Sulley looks in the first picture, don't be, you'll make at least one friend [ whose name is Regular Expressions ] before you leave this meetup :)

TO GAIN ENTRY TO BIG NERD RANCH (PLEASE READ THIS!):

There is a parking lot at BNR that will accommodate everyone. There are two doors, one on the front of the building and one on the side. I'll usually be at the side door, however the front door has a call button, should no one see you out there.

Should you be running late, please TEXT Laura's google voice number at[masked] and let me know you are outside and someone will come and let you in. AFTER 7:30 WE WILL NO LONGER BE LETTING PEOPLE IN.

Join or login to comment.

  • Maggie L.

    Hey Heidi & Laura, I'm soo happy you introduced me to your awkward friend Re Module --- I made an awesome little script to compare the state employee directory to a list of former state legislators ... to find out how many got a golden parachute ... strangely enough, it's only 10!! Let's see how many become lobbyists. xoxox

    February 3, 2013

    • Laura C.

      Hah! Awesome! <3 I'm curious to see the results myself...this is very interesting! Good job!

      February 3, 2013

  • Maggie L.

    Thank you for putting this together, what an awesome class.

    January 21, 2013

  • A former member
    A former member

    Yes, you can use regular expressions in good old Excel too! Take a look at http://msdn.microsoft.com/en-us/library/yd1hzczs.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2 and the Visual Basic code will look mighty similar to our mini exercises from tonight :)

    January 16, 2013

  • A former member
    A former member

    Laura: Regarding your question about why you wouldn't just use re.search with ^ (beginning of line) instead of re.match, I found some info at http://docs.python.org/2/library/re.html#search-vs-match:

    re.match('X' , 'A\nB\nX', re.MULTILINE) # No match
    re.search('^X', 'A\nB\nX', re.MULTILINE) # Match

    i.e. if your input_string consists of multiple lines (separated by newline characters), there is actually a difference if you use re.match vs re.search with ^. Specifically you would choose which method to use based on your exact requirement. Do you want any of the lines in your input to begin with X? Or do you want the WHOLE input_string to begin with X. Hope this makes sense :)

    January 16, 2013

  • A former member
    A former member

    2 links from tonight's meeting...

    The google python course (with the babynames exercise to help you use your regex knowledge) https://developers.google.com/edu/python/

    That awesome website for learning a plethora of things: www.memrise.com (I made a VIM course in it too for those interested in learning the command syntax for VI-related things http://www.memrise.com/course/52903/vim-2/)

    January 16, 2013

No one went

Our Sponsors

  • DigitalCrafts

    Thanks to full-stack coding bootcamp DC for providing meetup space.

  • Big Nerd Ranch

    Thanks to BNR for providing meetup space and food each month!

  • O'Reilly

    Free/Discounted books from the O'Reilly library

  • Pearson Publishing

    Free/Discounted Books for group members

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy