Click here to Skip to main content
15,879,096 members
Home / Discussions / C#
   

C#

 
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 
QuestionHelp me !!!!!!!!! Pin
nasaa6-Aug-07 21:53
nasaa6-Aug-07 21:53 
AnswerRe: Help me !!!!!!!!! Pin
Vasudevan Deepak Kumar7-Aug-07 0:51
Vasudevan Deepak Kumar7-Aug-07 0:51 
GeneralRe: Help me !!!!!!!!! Pin
Elayaraja Sambasivam7-Aug-07 1:06
Elayaraja Sambasivam7-Aug-07 1:06 
AnswerRe: Help me !!!!!!!!! Pin
Developer6117-Aug-07 5:06
Developer6117-Aug-07 5:06 
QuestionScrollBar on Form .NET 2005 C# Windows Form Pin
Elizma6-Aug-07 21:32
Elizma6-Aug-07 21:32 
AnswerRe: ScrollBar on Form .NET 2005 C# Windows Form Pin
Tormod Fjeldskaar6-Aug-07 21:46
Tormod Fjeldskaar6-Aug-07 21:46 
AnswerRe: ScrollBar on Form .NET 2005 C# Windows Form Pin
Nitin Khubani6-Aug-07 23:23
Nitin Khubani6-Aug-07 23:23 
Questionhelp .... Pin
B.A6-Aug-07 20:56
B.A6-Aug-07 20:56 
AnswerRe: help .... Pin
Christian Graus6-Aug-07 21:00
protectorChristian Graus6-Aug-07 21:00 
GeneralRe: help .... Pin
B.A6-Aug-07 21:27
B.A6-Aug-07 21:27 
AnswerPlease stop with 'help' titles Pin
leckey7-Aug-07 3:02
leckey7-Aug-07 3:02 
QuestionProblem in remoting Pin
Mic Mathi6-Aug-07 20:55
Mic Mathi6-Aug-07 20:55 
AnswerRe: Problem in remoting Pin
Parwej Ahamad6-Aug-07 23:55
professionalParwej Ahamad6-Aug-07 23:55 
GeneralRe: Problem in remoting Pin
Mic Mathi7-Aug-07 0:15
Mic Mathi7-Aug-07 0:15 
GeneralRe: Problem in remoting Pin
Parwej Ahamad7-Aug-07 0:19
professionalParwej Ahamad7-Aug-07 0:19 
GeneralRe: Problem in remoting Pin
Elayaraja Sambasivam7-Aug-07 1:11
Elayaraja Sambasivam7-Aug-07 1:11 

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.