Click here to Skip to main content
15,888,454 members
Home / Discussions / C#
   

C#

 
AnswerRe: Default program of file. Pin
Kumar Arun7-Aug-07 1:36
Kumar Arun7-Aug-07 1:36 
AnswerRe: Default program of file. Pin
Hessam Jalali7-Aug-07 1:47
Hessam Jalali7-Aug-07 1:47 
GeneralRe: Default program of file. Pin
Rahul.RK7-Aug-07 18:31
Rahul.RK7-Aug-07 18:31 
QuestionError while assigning value to a cell in a DataTable Pin
Vishnu Govind7-Aug-07 0:00
Vishnu Govind7-Aug-07 0:00 
AnswerRe: Error while assigning value to a cell in a DataTable Pin
Elayaraja Sambasivam7-Aug-07 0:11
Elayaraja Sambasivam7-Aug-07 0:11 
GeneralRe: Error while assigning value to a cell in a DataTable Pin
Vishnu Govind7-Aug-07 1:38
Vishnu Govind7-Aug-07 1:38 
GeneralRe: Error while assigning value to a cell in a DataTable Pin
Vishnu Govind7-Aug-07 2:04
Vishnu Govind7-Aug-07 2:04 
Questiondetail section of crystal report. Pin
monuSaini6-Aug-07 23:28
monuSaini6-Aug-07 23:28 
AnswerRe: detail section of crystal report. Pin
Elayaraja Sambasivam7-Aug-07 0:16
Elayaraja Sambasivam7-Aug-07 0:16 
QuestionCRL Checking Pin
Nitin Khubani6-Aug-07 23:17
Nitin Khubani6-Aug-07 23:17 
AnswerRe: CRL Checking Pin
Pete O'Hanlon6-Aug-07 23:40
mvePete O'Hanlon6-Aug-07 23:40 
QuestionTransparencyKey in MDI child form Pin
mcaos6-Aug-07 23:05
professionalmcaos6-Aug-07 23:05 
AnswerRe: TransparencyKey in MDI child form Pin
Martin#6-Aug-07 23:32
Martin#6-Aug-07 23:32 
GeneralRe: TransparencyKey in MDI child form Pin
mcaos6-Aug-07 23:39
professionalmcaos6-Aug-07 23:39 
QuestionDropDownLIst(c# window forms)-control the The Repetetions Pin
Vik Kommineni6-Aug-07 22:50
Vik Kommineni6-Aug-07 22:50 
QuestionHow to change the keyboard layout? Pin
Mic Mathi6-Aug-07 22:47
Mic Mathi6-Aug-07 22:47 
AnswerRe: How to change the keyboard layout? Pin
Hessam Jalali6-Aug-07 23:04
Hessam Jalali6-Aug-07 23:04 
GeneralRe: How to change the keyboard layout? Pin
Mic Mathi6-Aug-07 23:48
Mic Mathi6-Aug-07 23:48 
GeneralRe: How to change the keyboard layout? Pin
Hessam Jalali7-Aug-07 0:32
Hessam Jalali7-Aug-07 0:32 
GeneralRe: How to change the keyboard layout? Pin
Elayaraja Sambasivam7-Aug-07 0:51
Elayaraja Sambasivam7-Aug-07 0:51 
QuestionWhy load application so slow during the startup of the system Pin
remex_1980_junyongwu6-Aug-07 22:23
remex_1980_junyongwu6-Aug-07 22:23 
AnswerRe: Why load application so slow during the startup of the system Pin
il_masacratore6-Aug-07 22:29
il_masacratore6-Aug-07 22:29 
GeneralRe: Why load application so slow during the startup of the system Pin
Elayaraja Sambasivam7-Aug-07 0:55
Elayaraja Sambasivam7-Aug-07 0:55 
QuestionRegex : 2nd attempt Pin
Malcolm Smart6-Aug-07 22:01
Malcolm Smart6-Aug-07 22:01 
I trashed the C# forum (in Firefox) last time I posted a RegEx question - so apologies before hand if the screen all goes pear shaped..

This is C# in the loosest sense of the word in that I am using the RexEx class...

My File :-
=======================================================================
D:\\APPS\\23JUL07_1700__PID1520.LOG
--------log end-------------
2007-Jul-25 09:47:10:038 Boring text...
2007-Jul-25 09:47:10:194 Really boring text

=======================================================================
D:\\APPS\\23JUL07_1702__PID2304.LOG
--------log end-------------
2007-Jul-25 09:47:01:475 Some secret stuff 471773.1
2007-Jul-25 09:47:02:085 more secret stuff

=======================================================================
D:\\APPS\\24JUL07_1430__PID8908.LOG
--------log end-------------
2007-Jul-25 09:47:09:850 Important stuff...
2007-Jul-25 09:47:10:007 Critical stuff


Is there anyway to extract the PID and the timestamp in each block in a single regex? The pattern I am using, which gives me the PID is ...


(PID(?<MYPID>\d{1,9})\.LOG)</code>
I can then iterate through a MatchCollection obect returned from RegEx.Matches and process all the PIDS using the MYPID group. But I need the date as well. There will always be three lines following the line with the PID...

I can get the date with
(?<date>^\d{4}-[A-Z]{3}-\d{2}.(\d{2}: ){3}\d{3})
but can't join the two so I get the PID and date for each block.

The space after the colon in the date regex shouldn't be there - it prevents a smiley Smile | :) from showing.


Any help much appreciated.


"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF


"I haven't spoken to my wife now for 48 hours. I don't like to interrupt her.

AnswerRe: Regex : 2nd attempt - Done. Pin
Malcolm Smart6-Aug-07 22:33
Malcolm Smart6-Aug-07 22:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.