add cursor, enhance regexps