Browse files

APSTUD-4834 Auto-normalize newline characters for multi-line search

  • Loading branch information...
1 parent 5cb5335 commit e0a101c4b13c5343dc6a69851c3ffa52033f0210 Nam Le committed May 22, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 plugins/com.aptana.core/src/com/aptana/core/util/StringUtil.java
View
12 plugins/com.aptana.core/src/com/aptana/core/util/StringUtil.java
@@ -34,7 +34,17 @@
/**
* regexp for counting lines and splitting strings by lines.
*/
- public static final Pattern LINE_SPLITTER = Pattern.compile("\r?\n|\r"); //$NON-NLS-1$
+ public static final String LINE_SPLITTER_REGEX = "\r?\n|\r"; //$NON-NLS-1$
+
+ /**
+ * regex for newline group
+ */
+ public static final String REGEX_NEWLINE_GROUP = StringUtil.format("({0})", StringUtil.LINE_SPLITTER_REGEX); //$NON-NLS-1$
+
+ /**
+ * Pattern for counting lines and splitting strings by lines.
+ */
+ public static final Pattern LINE_SPLITTER = Pattern.compile(LINE_SPLITTER_REGEX);
/**
* TextPatternReplacer to sanitize html/xml to entities.

0 comments on commit e0a101c

Please sign in to comment.