I'm trying to monitor some hung threads in an application server and I got this line.
[5/30/16 11:31:18:501 CDT] 00000655 ThreadMonitor W WSVR0606W: Thread "MessageListenerThreadPool : 38" (00000655) was previously reported to be hung but has completed. It was active for approximately 964450 milliseconds. There is/are 0 thread(s) in total in the server that still may be hung.
You can use
sed to capture the number between "There is/are " and " thread" and remove everything else, like this:
sed 's/.*There is\/are \([0-9]\+\) thread.*/\1/' file