restrict whitespace pattern to ignore 'blocks' of whitespace consisting of only a single space
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1407536 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1ea6e4471c
commit
fa4ed70023
|
@ -151,7 +151,7 @@ public class StringUtils {
|
|||
/**
|
||||
* A regex pattern for recognizing blocks of whitespace characters.
|
||||
*/
|
||||
private static final Pattern WHITESPACE_PATTERN = Pattern.compile("\\s+");
|
||||
private static final Pattern WHITESPACE_PATTERN = Pattern.compile("(?: \\s|[\\s&&[^ ]])\\s*");
|
||||
|
||||
/**
|
||||
* <p>{@code StringUtils} instances should NOT be constructed in
|
||||
|
|
Loading…
Reference in New Issue