${filename%.*}
# % Deletes shortest match of pattern ".*" from back of "filename".
${filename#*.}
# Deletes the pattern '*.' from front of filename i.e. removes the name
The Linux Documentation project has this page on Manipulating Strings. Go down to the section marked substring removal