Loading ...
Sorry, an error occurred while loading the content.

RE: [edit+] File Manipulation

Expand Messages
  • Stevens, Timothy J. (LNG-ALB)
    Is this just a tab or comma delimited file, with one record per line, or something like that? You could write a keyboard recording (CTRL+Q) that inserts
    Message 1 of 5 , Jun 3, 2003
    • 0 Attachment
      Is this just a tab or comma delimited file, with one record per line, or
      something like that? You could write a keyboard recording (CTRL+Q) that
      inserts whatever you need at the beginning (or end) of the line and then
      moves down a line, assign it to a numeric key, then just hold down the key
      combination for that keyboard recording (ALT+number) to go through the file.
      If it's relatively short this will work. If it's millions of lines it won't.


      -tim

      -----Original Message-----
      From: bigjagr [mailto:bigjagr@...]
      Sent: Monday, June 02, 2003 4:04 PM
      To: editplus@yahoogroups.com
      Subject: [edit+] File Manipulation


      Hello! Currently using Edit Plus version two.

      Have a file with records 100 positions each, is there a way to
      manipulate the file by adding say a two position record id field to
      the start of the record and increase it to 102 positions.

      Have looked at the Help but have not found anything yet. Would
      appreciate any recommendations or tips. Thanks!





      http://www.editplus.com
      http://groups.yahoo.com/group/editplus

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • Stuart Hemming
      STJLA Is this just a tab or comma delimited file, with one record STJLA per line, or something like that? You could write a keyboard STJLA recording
      Message 2 of 5 , Jun 3, 2003
      • 0 Attachment
        STJLA> Is this just a tab or comma delimited file, with one record
        STJLA> per line, or something like that? You could write a keyboard
        STJLA> recording (CTRL+Q) that inserts whatever you need at the
        STJLA> beginning (or end) of the line

        Alternatively, you couple just use search and replace. Set the
        search pattern to '$' (no quotes) and the replace pattern to
        whatever it is you want adding, check 'Regular Expressions'
        and 'Wrap at end of File' then press 'Replace All'.

        Job done.

        --
        Stuart
      • bigjagr
        ... Hello! The file is just a regular flat file. No delimiters except for the carriage return at the end of each record line in the file. Will try one or
        Message 3 of 5 , Jun 3, 2003
        • 0 Attachment
          --- In editplus@yahoogroups.com, "Stuart Hemming" <shemming@e...>
          wrote:
          > STJLA> Is this just a tab or comma delimited file, with one record
          > STJLA> per line, or something like that? You could write a keyboard
          > STJLA> recording (CTRL+Q) that inserts whatever you need at the
          > STJLA> beginning (or end) of the line
          >
          > Alternatively, you couple just use search and replace. Set the
          > search pattern to '$' (no quotes) and the replace pattern to
          > whatever it is you want adding, check 'Regular Expressions'
          > and 'Wrap at end of File' then press 'Replace All'.
          >
          > Job done.
          >
          > --
          > Stuart


          Hello! The file is just a regular flat file. No delimiters except
          for the carriage return at the end of each record line in the file.
          Will try one or both of the recommended tips. Thanks!
        • bigjagr
          ... keyboard ... file. ... Hello! Have tried the regular expression tip and it worked fine. However, since the change was to add a field to the beginning of a
          Message 4 of 5 , Jun 3, 2003
          • 0 Attachment
            --- In editplus@yahoogroups.com, "bigjagr" <bigjagr@a...> wrote:
            > --- In editplus@yahoogroups.com, "Stuart Hemming" <shemming@e...>
            > wrote:
            > > STJLA> Is this just a tab or comma delimited file, with one record
            > > STJLA> per line, or something like that? You could write a
            keyboard
            > > STJLA> recording (CTRL+Q) that inserts whatever you need at the
            > > STJLA> beginning (or end) of the line
            > >
            > > Alternatively, you couple just use search and replace. Set the
            > > search pattern to '$' (no quotes) and the replace pattern to
            > > whatever it is you want adding, check 'Regular Expressions'
            > > and 'Wrap at end of File' then press 'Replace All'.
            > >
            > > Job done.
            > >
            > > --
            > > Stuart
            >
            >
            > Hello! The file is just a regular flat file. No delimiters except
            > for the carriage return at the end of each record line in the
            file.
            > Will try one or both of the recommended tips. Thanks!

            Hello! Have tried the regular expression tip and it worked fine.
            However, since the change was to add a field to the beginning of a
            record used the '^' and not the '$' which is for the end of the
            record after looking at the regular expression help.

            May need to look at the help further but was wondering if this same
            concept can be used to add fields in the middle of a record, possibly
            at the cursor position. This is just for future reference but may be
            useful if anyone has a way to perform this. Thanks!
          • Stuart Hemming
            b May need to look at the help further but was wondering b if this same concept can be used to add fields in the b middle of a record, possibly at the
            Message 5 of 5 , Jun 4, 2003
            • 0 Attachment
              b> May need to look at the help further but was wondering
              b> if this same concept can be used to add fields in the
              b> middle of a record, possibly at the cursor position. 
              b> This is just for future reference but may be useful
              b> if anyone has a way to perform this.  Thanks!

              Well, the simplest way to insert something at, say, the 10th
              position on a line is to set serach and replace up like this:

              Find Text: ^(..........)
              Replace Text: \1Your string here
              Regular Expressions [X]

              If the RE parse was a bit brighter, you could replace the Find
              String with ^(.{10}).

              I hope this helps.

              --
              Stuart
            Your message has been successfully submitted and would be delivered to recipients shortly.