Repository: commons-lang Updated Branches: refs/heads/master 7129c43b0 -> 44b6d2ead
[LANG-1238] Add RegexUtils class instead of overloadinh methods in StringUtils that take a regex to take precompiled Pattern. Javadoc tweaks. Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/44b6d2ea Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/44b6d2ea Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/44b6d2ea Branch: refs/heads/master Commit: 44b6d2ead50b83fa796bd246029a2f3967a021cb Parents: 7129c43 Author: Gary Gregory <garydgreg...@gmail.com> Authored: Thu May 17 17:14:36 2018 -0600 Committer: Gary Gregory <garydgreg...@gmail.com> Committed: Thu May 17 17:14:36 2018 -0600 ---------------------------------------------------------------------- .../java/org/apache/commons/lang3/RegExUtils.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-lang/blob/44b6d2ea/src/main/java/org/apache/commons/lang3/RegExUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/RegExUtils.java b/src/main/java/org/apache/commons/lang3/RegExUtils.java index 27463e3..97c32fc 100644 --- a/src/main/java/org/apache/commons/lang3/RegExUtils.java +++ b/src/main/java/org/apache/commons/lang3/RegExUtils.java @@ -20,7 +20,7 @@ import java.util.regex.Pattern; /** * <p>Helpers to process Strings using regular expressions.</p> - * * @see java.util.regex.Pattern + * @see java.util.regex.Pattern * @since 3.8 */ public class RegExUtils { @@ -66,7 +66,6 @@ public class RegExUtils { * @see String#replaceAll(String, String) * @see java.util.regex.Pattern * @see java.util.regex.Pattern#DOTALL - * @since 3.5 */ public static String removeAll(final String text, final String regex) { return replaceAll(text, regex, StringUtils.EMPTY); @@ -103,7 +102,6 @@ public class RegExUtils { * @see #replaceAll(String, Pattern, String) * @see java.util.regex.Matcher#replaceAll(String) * @see java.util.regex.Pattern - * @since 3.8 */ public static String removeAll(final String text, final Pattern regex) { return replaceAll(text, regex, StringUtils.EMPTY); @@ -149,7 +147,6 @@ public class RegExUtils { * @see String#replaceFirst(String, String) * @see java.util.regex.Pattern * @see java.util.regex.Pattern#DOTALL - * @since 3.5 */ public static String removeFirst(final String text, final String regex) { return replaceFirst(text, regex, StringUtils.EMPTY); @@ -186,7 +183,6 @@ public class RegExUtils { * @see #replaceFirst(String, Pattern, String) * @see java.util.regex.Matcher#replaceFirst(String) * @see java.util.regex.Pattern - * @since 3.8 */ public static String removeFirst(final String text, final Pattern regex) { return replaceFirst(text, regex, StringUtils.EMPTY); @@ -228,8 +224,6 @@ public class RegExUtils { * @see #replaceAll(String, String, String) * @see String#replaceAll(String, String) * @see Pattern#DOTALL - * @since 3.2 - * @since 3.5 Changed {@code null} reference passed to this method is a no-op. */ public static String replacePattern(final String text, final String regex, final String replacement) { if (text == null || regex == null || replacement == null) { @@ -264,9 +258,6 @@ public class RegExUtils { * @see #replacePattern(String, String, String) * @see String#replaceAll(String, String) * @see Pattern#DOTALL - * @since 3.2 - * @since 3.5 Changed {@code null} reference passed to this method is a no-op. - * */ public static String removePattern(final String text, final String regex) { return replacePattern(text, regex, StringUtils.EMPTY); @@ -318,7 +309,6 @@ public class RegExUtils { * @see String#replaceAll(String, String) * @see java.util.regex.Pattern * @see java.util.regex.Pattern#DOTALL - * @since 3.5 */ public static String replaceAll(final String text, final String regex, final String replacement) { if (text == null || regex == null || replacement == null) { @@ -362,7 +352,6 @@ public class RegExUtils { * * @see java.util.regex.Matcher#replaceAll(String) * @see java.util.regex.Pattern - * @since 3.8 */ public static String replaceAll(final String text, final Pattern regex, final String replacement) { if (text == null || regex == null || replacement == null) { @@ -415,7 +404,6 @@ public class RegExUtils { * @see String#replaceFirst(String, String) * @see java.util.regex.Pattern * @see java.util.regex.Pattern#DOTALL - * @since 3.5 */ public static String replaceFirst(final String text, final String regex, final String replacement) { if (text == null || regex == null|| replacement == null ) { @@ -459,7 +447,6 @@ public class RegExUtils { * * @see java.util.regex.Matcher#replaceFirst(String) * @see java.util.regex.Pattern - * @since 3.8 */ public static String replaceFirst(final String text, final Pattern regex, final String replacement) { if (text == null || regex == null|| replacement == null ) {