[ 
https://issues.apache.org/jira/browse/LANG-1658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory updated LANG-1658:
----------------------------------
    Affects Version/s:     (was: 3.12.0)

> Create new method to search for numbers within string
> -----------------------------------------------------
>
>                 Key: LANG-1658
>                 URL: https://issues.apache.org/jira/browse/LANG-1658
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>            Reporter: Mikhail Polivakha
>            Priority: Minor
>
> I have encountered in my work with a requirement to parse string and fetch 
> all of the numbers from it (may be integers, may be float). I guess, perhaps 
> it will be helpful for comunity. 
> Example of  use cases:
> 1) Input: " Duration : 12.3 days, 34minutes"
>     Output: [12.3, 34.0]
> 2) Input: " Weight is 76 and height is 180.2 cm"
>     Output : [76.0, 180.2]
> 3) Input: "Between 12.22 and 90"
>     Output: [12.22, 90]
> 4) Input: "First: 1289.0 Second: 9283.112 Third: 281"
>     Output : [1289.0, 9283.112, 281.0]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to