﻿// 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
function Validate(Regex, Text) {
    var re = new RegExp(Regex);
    var Match = re.exec(Text);
    
    if ((Match != null) && (Text == Match[0]))
    {
        return true;
    } 
    else
    {
        return false;
    }
}