Python Regular Expressions Tutorial – Part 2

Learn about Character Classes in python regular expressions.

“Anyone who says he can see through women is missing a lot.” ― Groucho Marx

1. Introduction

New to regular expressions? Start here.

In the last article, we covered some beginning aspects of regular expressions in python. We now continue to examine details of character classes.

Continue reading “Python Regular Expressions Tutorial – Part 2”

Python Regular Expressions Tutorial – Part 1

A Gentle Introduction to Python Regular Expressions

“Suspect each moment, for it is a thief, tiptoeing away with more than it brings.” ― John Updike, A Month Of Sundays

1. Introduction

Regular Expressions are a powerful mechanism for specifying a pattern to match a string. You can target specific segments you are interested in, and specify what it should include or exclude. In spite of all the power it provides, regular expressions are rather easy to pick-up and master. Almost every modern programming language, including python, perl, java, c/c++, javascript, etc. provide support for string manipulation using regular expressions. In this article, we show you python’s regular expression syntax with examples.

Continue reading “Python Regular Expressions Tutorial – Part 1”