Sha256: 9cb5cfe14d5028b724e1175977a8d62abac69fae058125bffcc682ff379536fa

Contents?: true

Size: 1.04 KB

Versions: 42

Compression:

Stored size: 1.04 KB

Contents

/regexp/.test(foo) || x = [/regexp/,/regexp/, /regexp/, // comment
// comment
/regexp/];
if (/regexp/.test(string))
{/regexp/.test(string);};
x =/regexp/;
x = /regexp/;
if (0</regexp/.exec(string) || 1>/regexp/.exec(string))
x = { u:/regexp/, v: /regexp/ };
foo();/regexp/.test(string); /regexp/.test(string);
if (!/regexp/) foobar();
x = u %/regexp/.exec(string) */regexp/.exec(string) / /regexp/.exec(string);
x = u?/regexp/.exec(string) : v +/regexp/.exec(string) -/regexp/.exec(string);
a = u^/regexp/.exec(string) &/regexp/.exec(string) |/regexp/.exec(string) +~/regexp/.exec(string);
x = /regexp/ /* a comment */ ;
x = /[reg/exp]/;
x = 4/2/i;
x = (a == b) ?/* this is a comment */ c : d;
/// a comment //
a = /regex//2/1; //syntactically correct, returns NaN




/* original examples */

// regex

blah(/abc/);
x = /abc/;
x = /abc/.match;

// math

blah(1/2); //comment
x = 1 / 2 / 3;
x = 1/1/.1;

// broken

x=/1/;
x=1/a/g;
x=a/a/g;

// real-world

var x = 1/(1+Math.sqrt(sum)); // convert to number between 1-0
return Math.round((num / den) * 100)/100;

Version data entries

42 entries across 42 versions & 5 rubygems

Version Path
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/pygments.rb-0.6.3/vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.6.3 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.6.2 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.6.1 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.6.0 vendor/pygments-main/tests/examplefiles/evil_regex.js
mortar-pygments.rb-0.5.7 vendor/pygments-main/tests/examplefiles/evil_regex.js
mortar-pygments.rb-0.5.6 vendor/pygments-main/tests/examplefiles/evil_regex.js
mortar-pygments.rb-0.5.5 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-jruby-0.5.4.2 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-jruby-0.5.4.1 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-jruby-0.5.4 vendor/pygments-main/tests/examplefiles/evil_regex.js
gitlab-pygments.rb-0.5.4 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.5.4 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.5.2 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.5.1 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.5.0 vendor/pygments-main/tests/examplefiles/evil_regex.js
gitlab-pygments.rb-0.3.2 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.4.2 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.4.1 vendor/pygments-main/tests/examplefiles/evil_regex.js
pygments.rb-0.3.7 vendor/pygments-main/tests/examplefiles/evil_regex.js