Fixed regexp to match node and instance names.