Reputation: 287
I have this string: OK (0 msec) and need to extract the following using Regex:
All parts may vary, but it will always be TEXT (DECIMAL TEXT)
And, it HAS to be done with Regex
Upvotes: 0
Views: 43
Reputation: 13450
use this regex ([a-zA-Z]+)\s\((\d+)\s([a-zA-Z]+)\)
OK
in group1
0
in group 2
msec
in group 3
Upvotes: 1