Copy file or folder name to clipboard, ignore extension etc

We have an introduction to them here:

Google also has pages of tutorials if you just search for "regular expressions". I'm not sure which to recommend, but I'm sure at least some of them are good.