Hello WorldLine 5to demonstrate a simple print setup. We then imported the regex module
reLine 7enabling us to use the
.matchregular 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 https://linuxconfig.org/python-regular-expressions-with-examples