Improved regex in wd_remove