Is it possible to build a "TOC" of a TXT file?

Is it possible to build a "TOC" of a TXT file?

3
NewbieNewbie
3

    Jan 24, 2005#1

    Hi,

    before considering registering UltraEdit, I need to know if it is possible to build a macro that can build a "table of contents" of a text file similar to a list of functions in a C or Java file.
    If it is, can someone please explain roughly how to do this? A typical TXT file contains page breaks and I want to include the first line after a page break in my TOC.

    Thanks.

    6,602548
    Grand MasterGrand Master
    6,602548

      Jan 25, 2005#2

      This macro do, what you want. It clears the clipboard and then searches in a loop for the page breaks and appends each line after a page break to the clipboard. After exit of the loop the clipboard contains all headlines. Now you can paste it where you want and reformat it.

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      ClearClipboard
      Loop
      Find "^b"
      IfFound
      Key HOME
      SelectLine
      CopyAppend
      EndSelect
      Else
      ExitLoop
      EndIf
      EndLoop
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        Jan 25, 2005#3

        Thank you very much, but it is not exactly what I'm looking for.

        What I like is a sort of list where I can jump to the individual items, like the function list. I've been trying to add a new "language" in the wordfile.txt but I can't get the function strings right.
        Do you know how I have to define the function strings to get what I want?

        Thank you.

        6,602548
        Grand MasterGrand Master
        6,602548

          Jan 26, 2005#4

          /Function String = "^b[ ]++^(*^)$"

          should do it, but it does not. Must be a bug of UltraEdit, because this regular expression works fine at the find command, but displays nothing in the function list. Please report this to IDM via mail, so IDM can solve the problem and you will have what you want in the next version of UltraEdit.
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            Jan 26, 2005#5

            Thanks. I mailed the problem and got almost instant reply: the find string in the wordfile.txt does not support the page break, but they will consider it for the next version.

            Ok, so when is a next version due? :-)

            80
            Advanced UserAdvanced User
            80

              Jan 27, 2005#6

              Next version is due in February so your feature request probably missed that version.