GitHub user rikles opened a pull request:

    https://github.com/apache/commons-lang/pull/92

    LANG-1139: Add null safe methods in StringUtils to replace by regular…

    Add null safe methods in StringUtils to replace by regular expression : 
    ```java
    public static String replaceAll(final String text, final String regex, 
final String replacement);
    public static String replaceFirst(final String text, final String regex, 
final String replacement);
    ```
    The `replacePattern(final String source, final String regex, final String 
replacement)` method adds `Pattern#DOTALL` option by default which may be 
undesired. Moreover, this methods is not null safe.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rikles/commons-lang fix-LANG-1139

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/92.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #92
    
----
commit 3acffccf15027bcf87e25a432f085c45e103b0ec
Author: Loic Guibert <[email protected]>
Date:   2015-05-28T12:20:14Z

    LANG-1139: Add null safe methods in StringUtils to replace by regular 
expression :
      - StringUtils.replaceAll(String, String, String)
      - StringUtils.replaceFirst(String, String, String)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to