Modified the regular expression to accomodate to different naming schemes.