SaskiasImp
Newcomer
- Joined
- Aug 22, 2003
- Messages
- 2
I'm just learning VB.NET and now Regular Expressions so please keep it simple. Here is a sample of the strings I am working with:
"15-aug-2003 20:03:13 16010630343646 00:05:28 0,87"
"16-aug-2003 19:01:34 16010049259163822 00:14:38 0,20"
"Mon, 11-Aug-2003 13:47:15 0705646712 00:03:12 0.08 0.12 0.14"
I've written some regular expressions to extract the date-time, phone numbers, etc but what I wanted to know is if there is a way to extract only the second occurance of a match? Currently to extract the length of the call (e.g the second occurance of - hh:mm:ss) I am using the following expression:
"(\d{2}:\d{2}:\d{2})(?=\s+[])"
I've been reading and looking at several examples but can't see a way to easily extract only the 2n'd (or 3rd etc) match from a string.
Great Forum, LOTS of info for a struggling beginner
"15-aug-2003 20:03:13 16010630343646 00:05:28 0,87"
"16-aug-2003 19:01:34 16010049259163822 00:14:38 0,20"
"Mon, 11-Aug-2003 13:47:15 0705646712 00:03:12 0.08 0.12 0.14"
I've written some regular expressions to extract the date-time, phone numbers, etc but what I wanted to know is if there is a way to extract only the second occurance of a match? Currently to extract the length of the call (e.g the second occurance of - hh:mm:ss) I am using the following expression:
"(\d{2}:\d{2}:\d{2})(?=\s+[])"
I've been reading and looking at several examples but can't see a way to easily extract only the 2n'd (or 3rd etc) match from a string.
Great Forum, LOTS of info for a struggling beginner
Last edited: