Register for your free account! | Forgot your password?

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

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

Advertisement



Regex Hilfe gesucht

Discussion on Regex Hilfe gesucht within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
Waller66's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,548
Received Thanks: 333
Question Regex Hilfe gesucht

Hallo will aus diesem Quellcode die "Links" bzw den text raus splitten :

Code:
<head>
<h1>Link56</h1>
</head>
<h1>Link578</h1>
<body>
</body>
<h1>Link56756</h1>
</html>
Mein Vb code ( im moment splittet er immer nur nach dem <h1>) will aber das nur das zwischen <h1> und dem </h1> raus splittet.

PHP Code:
Dim sourcestring As String RichTextBox1.Text
        Dim matchpattern 
As String "<h1>"
        
Dim splittext2 As String "</h1>"
        
Dim splitarray As String() = Regex.Split(sourcestringmatchpattern)
        
Dim splitarray2 As String() = Regex.Split(sourcestringsplittext2)

        For 
sIdx As Integer 0 To splitarray.Length 1

            MsgBox
(splitarray(sIdx))

        
Next 
Waller66 is offline  
Old 02/15/2013, 19:43   #2
 
tolio's Avatar
 
elite*gold: 2932
The Black Market: 169/1/0
Join Date: Oct 2009
Posts: 6,966
Received Thanks: 1,097
Code:
dim spl() as string = split(input,"<h1>")
for i = 0 to ubound(spl)
   spl(i) = split(spl(i),"</h1>")(0)
next
tolio is offline  
Thanks
1 User
Old 02/15/2013, 19:54   #3


 
Barca x3's Avatar
 
elite*gold: 30
Join Date: Sep 2007
Posts: 738
Received Thanks: 197
Mein Vorposter hat ja einen alternativen Lösungsvorschlag geposted, wenn du ansonsten nochmal Interesse an dem Thema hast und dich weiter in die Thematik einlesen willst, gibt es ein wunderbares Tutorial auf vbparadise.
->
Barca x3 is offline  
Old 02/15/2013, 20:21   #4
 
Waller66's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,548
Received Thanks: 333
vielen dank tolio ich liebe dich xD
Waller66 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
RegEx Pattern
09/23/2012 - General Coding - 2 Replies
Wäre jemand mal so nett mir einen funktionierenden RegEx Pattern zu geben, um das rotmarkierte rauszufilten? Ich kenn mich nicht besonders gut damit aus und bekomms einfach nicht gebacken..
c# Regex patern gesucht
09/18/2012 - .NET Languages - 1 Replies
Hallo Epvpler, ich suche nach einem passenden Pattern für meinen Code, ich möchte ein bestehendes Programm ändern und zwar wie folgt: Original: (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 ==>
[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#] 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 14:44.


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.