T-SQL String Manipulation Tips and Techniques, Part 1 | T-SQL content from SQL Server Pro
The idea is to check that you can find @N occurrences but not @N+1 or more. With both techniques, the validation is handled by a single expression. Therefore, you can easily embed the expression in a query filter or a CHECK constraint in a table definitio...