Updated regular expressions; enhanced javadoc