Fixed string used as regular expression for ID attribute (issue #1841)

Related with issue #1841