[ https://issues.apache.org/jira/browse/LANG-1307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15793315#comment-15793315 ]
ASF GitHub Bot commented on LANG-1307: -------------------------------------- GitHub user arbasha opened a pull request: https://github.com/apache/commons-lang/pull/225 [LANG-1307] - Add getDigits method to StringUtils You can merge this pull request into a Git repository by running: $ git pull https://github.com/arbasha/commons-lang master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/commons-lang/pull/225.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 #225 ---- commit 8bed366ff2895cceeb293318403dd5821ff29e5b Author: Arshad Basha <arba...@paypal.com> Date: 2017-01-02T18:44:33Z Added getDigits method to StringUtils ---- > Add a method in StringUtils to extract only digits out of input string > ---------------------------------------------------------------------- > > Key: LANG-1307 > URL: https://issues.apache.org/jira/browse/LANG-1307 > Project: Commons Lang > Issue Type: New Feature > Components: lang.* > Reporter: Arshad Basha > Priority: Minor > > This method will check if the input String contains Unicode digits, if yes > then concatenate all the digits and return it as a single String. > Examples: > StringUtils.getDigits(null) = null > StringUtils.getDigits("") = "" > StringUtils.getDigits("abc") = "" > StringUtils.getDigits("1000$") = "1000" > StringUtils.getDigits("1123~45") = "12345" > StringUtils.getDigits("(541) 754-3010") = "5417543010" > StringUtils.getDigits("\u0967\u0968\u0969") = "\u0967\u0968\u0969" -- This message was sent by Atlassian JIRA (v6.3.4#6332)