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:
Matthew Jason Benson 2012-11-09 16:45:37 +00:00
parent 1ea6e4471c
commit fa4ed70023
1 changed files with 1 additions and 1 deletions

View File

@ -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