Jump to content

Get first row after a string


xzaz
 Share

Recommended Posts

$Split = stringSplit($line,"<")
                    
                $Output = ""
                For $i = 1 to $Split[0]
                if $i = 1 Then 
                    $NextChar = StringLeft($Split[$i],1)
                    If $NextChar = "/" Then
                        $Output &= $Split[$i]
                    Else
                        $Output &= $Split[$i]
                    EndIf
                Else 
                    $NextChar = StringLeft($Split[$i],1)
                    If $NextChar = "/" Then
                        $Output &= "<"&$Split[$i]
                    Else
                        $Output &= @CRLF&"<"&$Split[$i]
                    EndIf
                Endif
                Next
        _GUICtrlEdit_SetText($EditFile,$Output)

Alright i want to sort This! file. That works, but now i want to copy the first <RLPoint></RLPoint> After the <RedLine>. Im confused. I am sure i need to check the string (i'v put them in a array) if the string is <RLPoint> copy and past the next id.

Could someone give me a punsh into the right direction? Tnx!

Link to comment
Share on other sites

Tnx for the answer, its not quite what i needed but it comes in the right direction. I never used StringRegExp yet. I will go and check that.

The thing i want:

the file i was provided was wrong that file only containd 1 <RedLine> i uploaded an other one witch got mutiple <RedLine>'s in it. After every <RedLine> there are <RLPoint>'s. I need the first <RLPoint> after every <RedLine>.

Hope this is clear, can't explane it better. Tnx for helping again! I realy appreciateit.

Edit: o the file: download

Edited by xzaz
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...