Hi Rob and Sree!
Yes you are correct i got this from the same site.... Sorry for being dumb without giving my logic or approach.
I am completely new to Regex. I browsed the API for
Pattern and Matches, decided that this will help me to solve this.
public static void main(
String[] args) {
String str = "work 1-(800) 555.1212 #1234";
Pattern pattern = Pattern.compile("(\\d{3})");
Matcher matcher = pattern.matcher(str);
System.out.println(matcher.find());
}
but now I am not getting how to add an appropriate pattern and how to get the searched value. (i know we have something liek group()) ..please help me to understand the regix.
Thanks
Deepak