What are regular expressions?

Google for Developers · 551K views · 2010 · 42:00

Open on YouTube

Python, Ruby & scripting languagesEducation & learninglecture

Why Stack Overflow recommends it

Stack Overflow users link it when answering Python regex questions and want to point askers to a clear, free introduction to the topic.

Recommended by 2 people across 2 different months, 2010 to 2013.

What it is

A 42-minute class session from Google's Python Class, taught by Nick Parlante, covering regular expressions in Python. It introduces regex syntax and the re module through live explanation and exercises.

What people said

Recommends rocksportrocker · 2011-09 · Stack Overflow · on “Regex in python”

As a starter: import re print re.match("\$\d\d\.\d+", "$12.1") print re.match("\$\d\d\.\d+", "12.1") print re.match("\$\d\d\.\d+", "$123.1") print re.match("\$\d\d\.\d+", "$12.") If you want to learn more about regular expressions in Python I recommend: [LINK] [LINK] [LINK] thanks to Stals: [this video]

Recommends Levon · 2012-05 · Stack Overflow · on “Python regular expression with raw string prefix”

This looks for at least one digit (or more) followed by a decimal point and zero or more digits after it. This quick reference/cheat sheet [LINK] might be helpful looking up the parts that make up regular expressions. This is a very nice Google video tutorial [this video] on regular expressions.

Cites chiurox · 2010-06 · Stack Overflow · on “Regular expression, How to allow combination of dot (period) and letters?”

As everyone already said, if you enclose a set of characters (no need to escape in this situation) in square brackets, you are saying: "please allow these characters I'm putting inside. I found a reference video for you: Skip to 22-23 min [this video]

Cites user1966593 · 2013-01 · Stack Overflow · on “Regular Expressions in Python-Scraping Data from website”

I used the following code and it was able to find the reports as I needed them. The Google presentation was a great help along with jdotjdot input [this video] The code that I used to find my XML was import re import urllib webpage=(" [LINK] ") response=urllib.urlopen(webpage).read() print re.findall(r"Report I want\w+[.]XML",response)