c# Regex patern gesucht

09/16/2012 12:53 .Scare™#1
Hallo Epvpler,
ich suche nach einem passenden Pattern für meinen Code, ich möchte ein bestehendes Programm ändern und zwar wie folgt:

Original:
Code:
(1)@start_of_file   ==> 
                      > N1 (16-SEP-2012)
                      > N2 (10:58:09)
                      > N3 #500=0.(====HOME POS FOR SPINDLE 2===)
(1)@def_turn_tool   ==> 
(0)@plane_data      ==> 
(0)@absolute_mode   ==> 
(1)@start_program   ==> 
                      > !!open file=c:\INDIGO\5000_UPPER_SUPPORT.EIA!!
                      > G109 L1
                      > !!open file=c:\INDIGO\5001_LOWER_SUPPORT.EIA!!
                      > N4 
                      > N5 G109 L2
(1)@rotate_to_plane ==> 
                      > !!open file=c:\INDIGO\5000_UPPER_SUPPORT.EIA!!
(0)@home_number     ==> 
(1)@turn_change_tool==> 
                      > N6 M901 (MAIN SPINDLE)
                      > N7 M202
                      > N8 T001T00M6D001
                      > N9 G123.1
Neu:
Code:
N1 (16-SEP-2012)
                       N2 (10:58:09)
                       N3 #500=0.(====HOME POS FOR SPINDLE 2===)
                       N5 G109 L2
                       N6 M901 (MAIN SPINDLE)
                       N7 M202
                       N8 T001T00M6D001
                       N9 G123.1
ich möchte eig. das nur noch die Zeile ab N1 .... N9999 bis ende Linie behaltet wird und der rest gelöscht wird.

mfg
09/18/2012 13:49 Kraizy​#2
PHP Code:
N[0-9].* 
Kannst ja mal hier testen: [Only registered and activated users can see links. Click Here To Register...]