"command line" was an idea from my post.
I mentioned command line because i could imagine that manipulating/handling an
such long line could take too much time from inside an editor.

To do this outside of an editor like PSPad use an script, no matter which
language, maybe Python, VBScript, JavaScript or any other. There are dedicated
forum which helps with that languages.

I would prefer VBS Visual Basic Script because the needed Windows Scripting Host
is already installed at most modern windows pc.

If you want you can use this VBScript code for your case:


' Paste this code into an new file with name "script.VBS".
' Modify the variable "strFileInput"  and write the name of your "10,000 lines"
file behind the equal sign.
' Put and double click this VBS in the same folder as your "10,000 lines" file
is in.
' You will get an new file with linebreaks between ">" and "<".


'// User settings:

strFileInput  = "MyInputFile.txt"

strFileOutput = strFileInput & "output.txt"

MsgBox "Start. Please click OK and wait for the Done message!"
'--------------------------------------------------------
'// the code, don't modify: 
Set FSO = CreateObject("Scripting.FileSystemObject")
Set oFile = FSO.OpenTextFile(strFileInput, 1)
strInput = oFile.ReadAll
oFile.Close
Set objRegEx = new RegExp 'CreateObject("VBScript.RegExp")
        objRegEx.IgnoreCase = True
        objRegEx.Global = True
        objRegEx.MultiLine = False
        objRegEx.Pattern = "><"
        If objRegEx.test(strInput) Then
                strOutput = objRegEx.Replace(strInput, ">" & vbCRLF & "<")
        Else
                MsgBox "Pattern doesn't match"
        End If
Set oFile = FSO.OpenTextFile(strFileOutput, 2, True)
oFile.WriteLine strOutput
oFile.Close 
'--------------------------------------------------------

MsgBox "Done."






-- 
greets,     Stefan
[img]http://pspad.milten.lima-city.de/Fan.gif[/img]  (pleased user since 1722)
[url=http://tinyurl.com/52xrj]inofficial FAQs[/url] +  
[url=http://forum.pspad.com/read.php?2,16286,page=2]Infos[/url] + 
[url=http://forum.pspad.com/read.php?6,24628]Special Settings[/url]

<http://forum.pspad.com/read.php?2,56575,56597>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem