jQuery: Restrict occurrence of specific word in textbox

Below jQuery code allows to restrict user to enter any specific word only once in textbox. For demo, I have used "article" word and it should occur only once in textbox. The code also makes case insensitive search.
$(document).ready(function () {
    $('#txtDesc').bind('keyup', function () {
        var txtToMatch = /article/gi;
        var iLimit = 1;
        var sMatch = $(this).val().match(txtToMatch);       
        if (sMatch !== null && sMatch.length > iLimit) {
            $(".error").html("The word 'article' can occur only once.");
        } else {
Related Post:
If you want to make case sensitive search then, change "/article/gi" to "/article/g".
Feel free to contact me for any help related to jQuery, I will gladly help you.

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..