
* Modify rule S6035: Add Python as covered language * Modify rule S6035: Fix description for python and php
16 lines
242 B
Plaintext
16 lines
242 B
Plaintext
include::../description_without_reference_to_s5998.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
preg_match("/a|b|c/", $str); // Noncompliant
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
preg_match("/[abc]/", $str);
|
|
// or
|
|
preg_match("/[a-c]/", $str);
|
|
----
|