Вот лови. работает. переделаешь под свои нужды. если тебе нужна будет помощь то обращайся. Всегда буду рад помочь
import java.util.regex.*;
public class Test
{
private static String REGEX = "[\\s\\d{1,2,3}\\u002E\\d{1,2,3}\\u002E\\d{1,2,3}\\u002E\\d{1,2,3}]";
private static String INPUT = "[ Call 8687 "
+ "from kel@sip:kel@192.168.100.100:5060;transport=udp" + "SDP:v=0"
+ "o=keller 0 0 IN IP4 192.168.100.60" + "c=IN IP4 192.168.100.60"
+ "]";
private static Pattern pattern;
private static Matcher matcher;
private static boolean found;
public static void main(String[] args)
{
pattern = Pattern.compile( REGEX );
matcher = pattern.matcher(INPUT);
System.out.println("Current REGEX is: "+REGEX);
System.out.println("Current INPUT is: "+INPUT);
while(matcher.find()) {
System.out.println("I found the text \"" + matcher.group() +
"\" starting at index " + matcher.start() +
" and ending at index " + matcher.end() + ".");
found = true;
}
if(!found){
System.out.println("No match found.");
}
}
}