24 lines
571 B
Plaintext
24 lines
571 B
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,java]
|
|
----
|
|
Pattern.compile("hello world");
|
|
----
|
|
|
|
=== Compliant solution
|
|
|
|
[source,java]
|
|
----
|
|
Pattern.compile("hello {3}world");
|
|
----
|
|
|
|
=== Exceptions
|
|
|
|
In https://www.regular-expressions.info/freespacing.html[free-spacing mode] (``++Pattern.COMMENTS++`` flag, or with embedded flag expression ``++(?x)++``), whitespaces are ignored. In this case no issue should be triggered, because the whitespaces may be intended to improve readability.
|
|
|
|
include::../implementation.adoc[]
|