32 lines
656 B
Plaintext
32 lines
656 B
Plaintext
![]() |
include::description.adoc[]
|
||
|
|
||
|
== Noncompliant Code Example
|
||
|
|
||
|
----
|
||
|
"(?:)*" // same as the empty regex, the '*' accomplishes nothing
|
||
|
"(?:|x)*" // same as the empty regex, the alternative has no effect
|
||
|
"(?:x|)*" // same as 'x*', the empty alternative has no effect
|
||
|
"(?:x*|y*)*" // same as 'x*', the first alternative would always match, y* is never tried
|
||
|
"(?:x?)*" // same as 'x*'
|
||
|
"(?:x?)+" // same as 'x*'
|
||
|
----
|
||
|
|
||
|
|
||
|
== Compliant Solution
|
||
|
|
||
|
----
|
||
|
"x*"
|
||
|
----
|
||
|
|
||
|
ifdef::env-github,rspecator-view[]
|
||
|
|
||
|
'''
|
||
|
== Implementation Specification
|
||
|
(visible only on this page)
|
||
|
|
||
|
include::message.adoc[]
|
||
|
|
||
|
include::highlighting.adoc[]
|
||
|
|
||
|
endif::env-github,rspecator-view[]
|