change regular expression anchors in indentity.rb