|
Regular expressions - extracting what's found
I have a bunch of lines of the format
(02:25:26) user: message
More precisely, in the language of regular expressions,
(\d+:\d+:\d+) .+:.*
What's the easiest way to extract the timestamp, user, and message from such a line? scanf can't quite do it.
Thanks,
- Mike Nolan
|