Simplified the regex used, added comments and changed the error message to contain the correct mod name.