in reply to regex on path

would m'/(\w*)'; print $1; work?