<pre>
{ field: <field>, regex: <pattern>, ... }
</pre>
326325
public static Query regex(String field,
                              String pattern,
                              int options) {
        return regex(field, pattern, is(options, CASE_INSENSITIVE), is(options, EXTENDED), is(options, MULTILINE), is(options, DOTALL));
    }
209949
function parseYieldExpression() {
        var argument, expr, delegate, previousAllowYield;

        argument = null;
        expr = new Node();
        delegate = false;

        expectKeyword('yield');

        if (!hasLineTerminator) {
            previousAllowYield = state.allowYield;
            state.allowYield = false;
            delegate = match('*');
            if (delegate) {
                lex();
                argument = parseAssignmentExpression();
            } else {
                if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) {
                    argument = parseAssignmentExpression();
                }
            }
            state.allowYield = previousAllowYield;
        }

        return expr.finishYieldExpression(argument, delegate);
    }
510719
public static Query withMatchingString(String field, String value, boolean caseInsensitive) {
        return caseInsensitive ? regex(field, escapeRegExPattern(value), caseInsensitive, false, false, false) : withValue(field, eq, value);
    }
901844
function(field, validation) {
            var
              $field        = module.get.field(field.identifier),
              type          = validation.type,
              value         = $field.val() + '',

              bracketRegExp = /\[(.*?)\]/i,
              bracket       = bracketRegExp.exec(type),
              isValid       = true,
              ancillary,
              functionType
            ;
            // if bracket notation is used, pass in extra parameters
            if(bracket !== undefined && bracket !== null) {
              ancillary    = '' + bracket[1];
              functionType = type.replace(bracket[0], '');
              isValid      = $.proxy(settings.rules[functionType], $module)(value, ancillary);
            }
            // normal notation
            else {
              isValid = $.proxy(settings.rules[type], $field)(value);
            }
            return isValid;
          }
168805
function(string){
				var pattern = /(^|\W)(\w)(\w*)/g,
					result = [],
					match;
				
				while (pattern.exec(string)) {
					result.push(RegExp.$1 + RegExp.$2.toUpperCase() + RegExp.$3);
				}
				
				return result.join('');
			}
625409
function () {
        var matchPattern = this.pattern,
            // Check the match pattern of sanity and split it into protocol, host and path
            match = matchPattern.match(regexes.patternSplit);

        if (!match) {
            // This ensures it is a invalid match pattern
            return;
        }

        return {
            protocols: _.uniq(match[1].split(PROTOCOL_DELIMITER)),
            host: match[5],
            port: match[6] && match[6].substr(1), // remove leading `:`
            path: this.globPatternToRegexp(match[7])
        };
    }
376309
function extractNamedFields(fields, input) {
  var output = Object.create(null);
  fields.forEach(function(field) {
    var subObject = input;
    for (var i = 0; i < field.path.length; i += 1) {
      if (subObject == undefined) {
        throw new Error("Unreachable: matched input will always have fields");
      }
      subObject = subObject[field.path[i]];
    }
    switch (field.typeShortcut) {
      // type matcher:
      case 1:
        subObject = global[field.type](subObject);
      break;
      // literal matcher:
      case 3:
        subObject = field.object;
      break;
    }
    output[field.name] = subObject;
  });
  return output;
}
856369
function(field) {
            var
              $field      = module.get.field(field.identifier),
              fieldValid  = true,
              fieldErrors = []
            ;
            if(field.rules !== undefined) {
              $.each(field.rules, function(index, rule) {
                if( module.has.field(field.identifier) && !( module.validate.rule(field, rule) ) ) {
                  module.debug('Field is invalid', field.identifier, rule.type);
                  fieldErrors.push(rule.prompt);
                  fieldValid = false;
                }
              });
            }
            if(fieldValid) {
              module.remove.prompt(field, fieldErrors);
              $.proxy(settings.onValid, $field)();
            }
            else {
              formErrors = formErrors.concat(fieldErrors);
              module.add.prompt(field, fieldErrors);
              $.proxy(settings.onInvalid, $field)(fieldErrors);
              return false;
            }
            return true;
          }
1287756
static Map<String, Object> patternPayload(final Object regex) {
		if (regex == null) {
			return null;
		}
		Map<String, Object> payload = new LinkedHashMap<>();
		payload.put("value", regex);
		payload.put("message", MSG_PREFIX + VALIDATORS.get(Pattern.class));
		return payload;
	}
373989
function(fields, data) {
    if (!_.isString(fields)) {
      return data;
    }

    // If a field is specified as `foo.bar` or `foo.bar.baz`,
    // Convert it to just `foo`
    var map = {};
    _.forEach(fields.split(','), function(field) {
      map[field.split('.')[0]] = 1;
    });

    var keys = _.keys(map);
    if (_.isArray(data)) {
      data = _.map(data, function(object) {
        return _.pick(object, keys);
      });
    } else if (_.isObject(data)) {
      data = _.pick(data, keys);
    }

    return data;
  }
208740
public List<Filter> getAllFiltersForField(String field) {
		List<Filter> foundFilters = new ArrayList<>();

		for (Filter filter : this.filters) {
			if (filter.getField().equals(field)) {
				foundFilters.add(filter);
			}
		}

		return Collections.unmodifiableList(foundFilters);
	}
990339
private Pattern makePattern(String noProxy) {
        String regex = noProxy.replaceAll("\\.", "\\\\.").replaceAll("\\*", ".*");
        if (!regex.startsWith(".*")) {
            regex = ".*" + regex;
        }
        regex = "^" + regex + "$";
        return Pattern.compile(regex);
    }
65679
def field(key, value)
      field = "<<"
      field << "/T" + "(#{key})"
      field << "/V" + (Array === value ? "[#{value.map{ |v|"(#{quote(v)})" }.join}]" : "(#{quote(value)})")
      field << ">>\n"
      field
    end
845967
Field dereference(Field self, String field) {
    if (field.startsWith("[") && field.endsWith("]")) {
      field = field.substring(1, field.length() - 1);
    }

    Type type = protoTypeNames.get(self.type().toString());
    if (type instanceof MessageType) {
      MessageType messageType = (MessageType) type;
      Field messageField = messageType.field(field);
      if (messageField != null) return messageField;

      Map<String, Field> typeExtensions = messageType.extensionFieldsMap();
      Field extensionField = resolve(field, typeExtensions);
      if (extensionField != null) return extensionField;
    }

    return null; // Unable to traverse this field path.
  }
893836
function compilePattern(pattern) {
  // pass estree syntax tree obj
  if (pattern && pattern.type) return pattern;

  if (typeof pattern !== 'string') {
    throw new Error('input pattern is neither a string nor an estree node.');
  }

  let exp = parser(pattern);

  if (exp.type !== 'Program' || !exp.body) {
    throw new Error(`Not a valid expression:  "${pattern}".`);
  }

  if (exp.body.length === 0) {
    throw new Error(`There is no statement in pattern "${pattern}".`);
  }

  if (exp.body.length > 1) {
    throw new Error(`Multiple statements is not supported "${pattern}".`);
  }

  exp = exp.body[0];
  // get the real expression underneath
  if (exp.type === 'ExpressionStatement') exp = exp.expression;
  return exp;
}
383847
public ZealotKhala orLikePattern(String field, String pattern) {
        return this.doLikePattern(ZealotConst.OR_PREFIX, field, pattern, true, true);
    }
219221
function (word) {
      var pattern = '',
        any = '[^a-z0-9]?',
        last = false,
        character;

      for (var i = 0; i < word.length; i++) {
        last = i === (word.length - 1);
        character = word.charAt(i);

        if (typeof this.map1337[character] === 'undefined') {
          pattern += (character + (!last ? any : ''));

          continue;
        }

        if (typeof this.map1337[character] === 'string') {
          pattern += ('((' + character + '|' + this.map1337[character] + ')' + (!last ? any : '') + ')');

          continue;
        }

        pattern += '((' + character;

        for (var m = 0; m < this.map1337[character].length; m++) {
          pattern += '|' + this.map1337[character][m];
        }

        pattern += ')' + (!last ? any : '') + ')';
      }

      this.patterns.words.pattern.push(new RegExp(pattern, 'ig'));

      return this;
    }