There are a couple of ways of doing this.
Arguable, the 'right' way is via AppleScriptObjC, which properly understands filenames, extensions, etc., and is faster than trying to manipulate the Finder to give you the result:
use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use scripting additions
set list_of_filenames to {}
tell application "Finder"
set theFiles to (get selection)
repeat with each_file in theFiles
set posix_path to (POSIX path of (each_file as alias))
set baseName to (current application's NSURL's fileURLWithPath:posix_path)'s URLByDeletingPathExtension()'s lastPathComponent() as text
copy baseName to end of list_of_filenames
end repeat
return list_of_filenames
end tell
As for your 'can't have commas or spaces' requirement, that's a whole different story. What happens with a filename "some very long filename.txt" or "January 15th, 2020"? Do you want to strip the spaces and commas from that, too?