RegExp.test

Description

Tests for a match in a string of the regular expression. Returns 1/0.

Inputs

  • pattern
  • flags
  • string

Outputs

  • Tests for a match in a string. Returns 1/0.

Algorithm

/**
 * RegExp.test: Tests for a match in a string of the regular expression. Returns 1/0.
 *
 * @param x1 pattern
 * @param x2 flags
 * @param x3 string
 * @return {Array}
 */
function neuron751(x1, x2, x3)
{
var pattern = x1; var flags = x2; var string = x3; var r = new RegExp(pattern, flags); return (r.test(string)) ? [1] : [0];
}

console.log(neuron751(264, 188, 312));

Create your family tree for free