Click here to Skip to main content
15,912,329 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to replace text until end of the line? Pin
sweehin1822-Jul-07 2:18
sweehin1822-Jul-07 2:18 
AnswerRe: How to replace text until end of the line? Pin
Luc Pattyn22-Jul-07 2:44
sitebuilderLuc Pattyn22-Jul-07 2:44 
GeneralRe: How to replace text until end of the line? Pin
sweehin1822-Jul-07 2:59
sweehin1822-Jul-07 2:59 
GeneralRe: How to replace text until end of the line? Pin
Luc Pattyn22-Jul-07 3:32
sitebuilderLuc Pattyn22-Jul-07 3:32 
GeneralRe: How to replace text until end of the line? Pin
sweehin1823-Jul-07 4:59
sweehin1823-Jul-07 4:59 
GeneralRe: How to replace text until end of the line? Pin
Luc Pattyn23-Jul-07 5:22
sitebuilderLuc Pattyn23-Jul-07 5:22 
GeneralRe: How to replace text until end of the line? Pin
Luc Pattyn23-Jul-07 5:23
sitebuilderLuc Pattyn23-Jul-07 5:23 
GeneralRe: How to replace text until end of the line? Pin
sweehin1823-Jul-07 9:16
sweehin1823-Jul-07 9:16 
Dim textdelimiter As String<br />
            textdelimiter = "  "<br />
<br />
            Dim splitout() = Split(TextLineContent, textdelimiter)<br />
<br />
            Dim i As Integer<br />
<br />
            For i = 0 To UBound(splitout)<br />
<br />
                Dim startIndex As Integer<br />
                startIndex = splitout(i).IndexOf("V")<br />
<br />
                If startIndex >= 0 Then<br />
<br />
                    Dim endMarkLen = (splitout(i).Length)<br />
<br />
                    Dim endIndex = splitout(i).IndexOf(splitout(i), startIndex)<br />
<br />
                    Dim SecondstartIndex As Integer<br />
                    SecondstartIndex = splitout(i).IndexOf("V", startIndex)<br />
<br />
                    If (SecondstartIndex >= 0) Then<br />
                        splitout(i) = splitout(i).Substring(0, SecondstartIndex)<br />
                    Else<br />
                        If (endIndex < 0) Then<br />
<br />
                        splitout(i) = splitout(i).Substring(0, startIndex)<br />
<br />
                        Else<br />
                        splitout(i) = splitout(i).Substring(0, startIndex) + splitout(i).Substring(endIndex + endMarkLen)<br />
<br />
                        End If<br />
                    End If<br />
<br />
                End If<br />
<br />
                SplitTextLineContent += Trim(splitout(i)) & " "            <br />
<br />
            Next i


Hi,

It didn't work. i tried to find the second occurance of "V" and want to store the array from 0 to the second occurance of "V". I have already struggled for few hours.
GeneralRe: How to replace text until end of the line? Pin
Luc Pattyn23-Jul-07 9:36
sitebuilderLuc Pattyn23-Jul-07 9:36 
GeneralRe: How to replace text until end of the line? Pin
Luc Pattyn22-Jul-07 3:41
sitebuilderLuc Pattyn22-Jul-07 3:41 
GeneralRe: How to replace text until end of the line? Pin
sweehin1822-Jul-07 6:42
sweehin1822-Jul-07 6:42 
QuestionI have problem Pin
wayen22-Jul-07 1:53
wayen22-Jul-07 1:53 
AnswerRe: I have problem Pin
Sathesh Sakthivel22-Jul-07 4:07
Sathesh Sakthivel22-Jul-07 4:07 
GeneralRe: I have problem Pin
Paul Conrad22-Jul-07 5:38
professionalPaul Conrad22-Jul-07 5:38 
AnswerSearch and thou shall find Pin
Luc Pattyn22-Jul-07 9:51
sitebuilderLuc Pattyn22-Jul-07 9:51 
GeneralRe: Search and thou shall find Pin
Paul Conrad22-Jul-07 10:27
professionalPaul Conrad22-Jul-07 10:27 
JokeRe: Search and thou shall find Pin
Luc Pattyn22-Jul-07 10:46
sitebuilderLuc Pattyn22-Jul-07 10:46 
GeneralRe: Search and thou shall find Pin
Paul Conrad22-Jul-07 11:12
professionalPaul Conrad22-Jul-07 11:12 
GeneralRe: Search and thou shall find Pin
Sathesh Sakthivel22-Jul-07 15:58
Sathesh Sakthivel22-Jul-07 15:58 
QuestionTraffic Monitoring System Pin
Jshuwa21-Jul-07 16:39
Jshuwa21-Jul-07 16:39 
AnswerRe: Traffic Monitoring System Pin
Psycho-*Coder*-Extreme21-Jul-07 17:22
Psycho-*Coder*-Extreme21-Jul-07 17:22 
AnswerRe: Traffic Monitoring System Pin
Sathesh Sakthivel21-Jul-07 19:35
Sathesh Sakthivel21-Jul-07 19:35 
GeneralRe: Traffic Monitoring System Pin
Christian Graus22-Jul-07 10:23
protectorChristian Graus22-Jul-07 10:23 
AnswerRe: Traffic Monitoring System Pin
Christian Graus22-Jul-07 10:21
protectorChristian Graus22-Jul-07 10:21 
JokeRe: Traffic Monitoring System Pin
Luc Pattyn22-Jul-07 10:49
sitebuilderLuc Pattyn22-Jul-07 10:49 

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.