View Single Post
Old Apr 22nd, 2005, 1:28 PM   #1
mpn
Newbie
 
Join Date: Apr 2005
Posts: 2
Rep Power: 0 mpn is on a distinguished road
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
mpn is offline   Reply With Quote