semantic.js
function(value, regExp) {
      if(regExp instanceof RegExp) {
        return value.match(regExp);
      }
      var
        regExpParts = regExp.match($.fn.form.settings.regExp.flags),
        flags
      ;
      // regular expression specified as /baz/gi (flags)
      if(regExpParts) {
        regExp = (regExpParts.length >= 2)
          ? regExpParts[1]
          : regExp
        ;
        flags = (regExpParts.length >= 3)
          ? regExpParts[2]
          : ''
        ;
      }
      return value.match( new RegExp(regExp, flags) );
    }
function(value, regExp) {
      if(regExp instanceof RegExp) {
        return value.match(regExp);
      }
      var
        regExpParts = regExp.match($.fn.form.settings.regExp.flags),
        flags
      ;
      // regular expression specified as /baz/gi (flags)
      if(regExpParts) {
        regExp = (regExpParts.length >= 2)
          ? regExpParts[1]
          : regExp
        ;
        flags = (regExpParts.length >= 3)
          ? regExpParts[2]
          : ''
        ;
      }
      return value.match( new RegExp(regExp, flags) );
    }
function ( value , regExp ) { if ( regExp instanceof RegExp ) { return value . match ( regExp ) ; } var regExpParts = regExp . match ( $ . fn . form . settings . regExp . flags ) , flags ; // regular expression specified as /baz/gi (flags) if ( regExpParts ) { regExp = ( regExpParts . length >= 2 ) ? regExpParts [ 1 ] : regExp ; flags = ( regExpParts . length >= 3 ) ? regExpParts [ 2 ] : '' ; } return value . match ( new RegExp ( regExp , flags ) ) ; }
matches specified regExp
matches specified regExp