// http://www.regular-expressions.info/javascriptexample.html <-- a little about regex in javascript
// Created by Oleg
// Gets an regex expression, and a text, and checking it
$.fn.validate = function(Regex) {
    var re = new RegExp(Regex);
    var Match = re.exec(this.val());
    
    if ((Match != null) && (this.val() == Match[0]))
    {
        return true;
    } 
    else
    {
        return false;
    }
}