I have a String :
<E-25-Lorem Ipsum is simply dummy text-34>
I want to get the string "Lorem Ipsum is simply dummy text" and assign it to a variable "msg" so that I can use it else where.
Here is my code :
String pattern = "([A-Za-z_ ])\\w+";
//Create a Pattern object
Pattern r = Pattern.compile(pattern);
//Matcher Object
Matcher m = r.matcher(frame);
String msg = new String();
if (m.find( )){
msg = m.group(0);
}
System.out.println(msg);
System.out.println(msg) on prints out the "Lorem", instead it is meant to print "Lorem Ipsum is simply dummy text".