37 lines
662 B
Plaintext
Raw Normal View History

== Why is this an issue?
Empty character classes in regular expressions don't match anything.
This is likely a sign that the regular expression does not work as intended.
=== Noncompliant code example
[source,javascript]
----
/^foo[]/.test("foobar"); // false
----
=== Compliant solution
[source,javascript]
----
/^foo/.test("foobar"); // true
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Rework this empty character class that doesn't match anything.
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]