Tapatalk

Add a letter to the first of each line.

Add a letter to the first of each line.

8
NewbieNewbie
8

    Mar 31, 2005#1

    How can I add a letter to the first of each line???

    Example:
    Change this:
    0016232 This is line 1.
    0013488 This is line 2.

    to this:
    e0016232 This is line 1.
    e0013488 This is line 2.

    Thanks

      Mar 31, 2005#2

      I wrote a macro to add an 'e' in the first pos of the line, then I had the macro run 18,000 times to get all lines. It took some time, but it worked. :D

      1
      NewbieNewbie
      1

        Mar 31, 2005#3

        Try this:

        Invoke the Search/Replace dialog and enter following Unix regular expression strings:

        Find: ^(.*)$
        Replace With: e\1

        Basically that says, find each line and store it as avariable.

        Then replace with a constant e followed by each variable found.

        And there you are.

        Now, if you didn't want the whole file done, just select the text you want this done for and check the box for selected text only.

        Enjoy.

        2
        NewbieNewbie
        2

          Apr 02, 2005#4

          Here's another way:

          (Macro Form)

          Top
          ColumnModeOn
          ColumnInsert "e"

          (Using the keyboard)

          ALT-C (to turn on column mode)
          ALT-L,I (column menu, insert)
          CTRL+HOME (go to top of file)
          e (the letter you want to insert)

          8
          NewbieNewbie
          8

            Apr 06, 2005#5

            wodder

            That works great! and much faster then my macro.

            Thanks guys,

            Danny