I have a string as below.
$Alarm:com.Alarm(a == 123 || (count == 12345 , time matches "24"))
whenever i encounter the above string i need to generate the following string.I mean i need to append the string "from Stream" as below.
$Alarm:com.Alarm(a == 123 || (count == 12345 , time matches "24")) from Stream.
I am currently using the following pattern to acheive the same in java.
Pattern eventPattern = Pattern.compile(".*?\\.Alarm\\(.*?\\)");
But i am getting the following output.
$Alarm:com.Alarm(a == 123 || (count == 12345 , time matches "24") from Stream )
Please provide me some pointers to acheive the correct output.The regular expression should consider only the last paranthesis.
eventPattern?