Rewrote regular expression in anonymous functions example 2.