IT 117: Intermediate Scripting
Class 12

Today's Topics

Tips and Examples


New Material

Homework 6

I have posted homework 6 here.

It is due this coming Sunday at 11:59 PM.


The mid-term exam will be given on Tuesday, March 20th.

This is the first Tuesday after the Spring break.

It will consist of questions like those on the quizzes along with questions asking you to write short segments of Python code.

60% of the points on this exam will consist of questions from the Ungraded Class Quizzes.

The last class before the exam, Thursday, March 8th, will be a review session.

You will only be responsible for the material in the Class Notes for that class on the exam.

The Mid-term is a closed book exam.

Tips and Examples


Why Check Command Line Arguments?

Telling the User What Went Wrong

Improving the Usage Message


The Characters in Regular Expressions

Ordinary Characters in Regular Expressions

Using Regular Expressions to Find a Match

Pattern Objects

Raw Strings

A Test Function for Regular Expressions

Meta-characters in Regular Expressions

The . Meta-character

The * Meta-character

The + Meta-character

The ? Meta-character

Match Starts from Beginning of String

The \ Meta-character

Character Classes

\d and \D Character Classes

The \w and \W Character Classes

The \s and \S Character Classes

New Material

Skipping Characters to Find a Match

Real World Regular Expressions

Getting Strings from a Match

The ( ) Meta-characters

Extracting Text in a Loop

A New Regular Expression Testing Script

Repetition in Regular Expressions

Specifying a Range of Repeating Characters

Creating Custom Character Classes

Ranges of Characters in a Character Class

Anchors in Regular Expressions

The ^ Meta-Character

The | Meta-Character

Greedy versus Non-greedy Matching