Your first option is that you can, providing your Contract of Employment allows, withhold the same amount of pay equivalent to each day they fall short of the required notice.
If that option isn’t available, because they have resigned immediately after pay day, you could sue them for a breach of contract.
We would recommend that you assess the likely cost of doing this versus your chances of success before doing so.
In many cases, cutting your losses and moving on is the best approach although some situations are more complex and will warrant a different solution.
If you have a complex case we recommend you take professional advice.