Fixing the -d issue and added regex attribute