Friday, 8 July 2016

How to extract digits from a String in Java

Many times, we have to verify the numbers from a given string.

Below Java code will help get the digits from the string.

public String extractDigits(String str){
       return str.replaceAll("[^0-9]","");
    }

What do you think on above selenium topic. Please provide your inputs and comments. You can write to me at reply2sagar@gmail.com

1 comment:

  1. very useful content .one of the recommanded blog very appriciated thank you for giving such nice content best regards from sbr

    selenium free training

    ReplyDelete

Buy Best Selenium Books

Contributors