Python Regular Expressions with Examples -

Here we first printed Hello World Line 5to demonstrate a simple print setup. We then imported the regex module re Line 7enabling us to use the .match regular expression Line 8matching function of that library.

The syntax of the .match function is (pattern,string) where pattern was defined as the regular expression ^.’ and we used the same Hello World string as our input string.

This is a companion discussion topic for the original entry at