Post thumbnail of Case insensitive regex in bash
8 November 2010
Continue reading Case insensitive regex in bash

Case insensitive regex in bash

Shopt toggles the values of variables controlling optional shell behavior. If you want to match a regular expression while ignoring the case, the easiest method is to use shopt. You can use shopt set, unset, and print out settable options such as the ability to expand aliases and debugging options.

Post thumbnail of Python Regular Expression Syntax
14 January 2010
Continue reading Python Regular Expression Syntax

Python Regular Expression Syntax

You can use regular expressions in python by using the “re” module. Both patterns and strings to be searched can be Unicode strings as well as 8-bit strings. Most of the regex module functions don’t force you to compile a regex object first, which I rarely do. You can easily use regular expressions by placing them inside python’s raw string notation using apostrophes.

Powered by Wordpress   |   Lunated designed by ZenVerse