Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 20:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



c# Regex patern gesucht

Discussion on c# Regex patern gesucht within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
.Scare™'s Avatar
 
elite*gold: 66
Join Date: Jan 2012
Posts: 234
Received Thanks: 145
c# Regex patern gesucht

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
.Scare™ is offline  
Old 09/18/2012, 13:49   #2
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
PHP Code:
N[0-9].* 
Kannst ja mal hier testen:
Kraizy​ is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Kleines Problem mit RegEx
09/16/2012 - .NET Languages - 4 Replies
Hey Leute ich habe folgenden Code: System.Text.RegularExpressions.Regex(RichTextBox1. Text, "Ha.*s", RegexOptions.IgnoreCase) Die Fehlermeldung lautet jetzt: "Regex ist ein Typ in RegularExpressions und kann nicht als Ausdruck verwendet werden." Könnt ihr mir mal helfen? Ich glaub ich steh grade voll auf dem Schlauch...
[C#]RegEx Problem
11/29/2011 - .NET Languages - 4 Replies
Also ich habe ein Problem, hab ein Patter erstellt: rf_token: '(\w.*)' Nach RegexBuddy gibt es 2 Machtes und in der zweitem Match ist richtige Wert. Aber mit diesem Code bekomme ich Wert nicht wieso wo ist Fehler? string re1 = "rf_token: '(\\w.*)'"; // Variable Name 1 Regex r = new Regex(re1, RegexOptions.IgnoreCase | RegexOptions.Singleline); Match m = r.Match(Winhttp.Body); String var1 = m.Groups.ToString();
[C#] Problem mit Regex
07/11/2010 - .NET Languages - 2 Replies
Huhu, Ich hab da ein kleines Problem was ich irgendwie nicht schaffe zu lösen.. Also ich hab folgenden Source: public List<string> GetHtmlLinks(string html) { string linkPattern = "<a href=\"(.*?)\">(.*?)</a>"; MatchCollection linkMatches = Regex.Matches(html, linkPattern, RegexOptions.Singleline);
Reguläre Ausdrücke -> RegEx
06/22/2010 - Aion - 0 Replies
Progamm: NyerkBot Problem: Chat.log bzw. RegEx wurden anscheinend verändert, sodass Geschichten wie Cast Detection oder Spells auf Evade/Parri nicht mehr genutzt werden... kennt einer ne Lösung? Oder weiß wie man das löst?
[c#] Regex Klasse
03/11/2010 - .NET Languages - 2 Replies
Hallo ich habe eine Frage zu der Regex Klasse. Meine Seite hat folgenden Quelltext: treffer>1<treffer treffer>2<treffer treffer>3<treffer treffer>4<treffer treffer>4<treffer treffer>5<treffer



All times are GMT +1. The time now is 20:43.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.