Moving text from the end of the line to beginning

Moving text from the end of the line to beginning

4
NewbieNewbie
4

    Jan 24, 2006#1

    **SORY ADMIN I POSTED IN THE WRONG FORUM< SHOULD BE IN MACROS**

    I have a CSV file of contacts I need to sort out.

    Code: Select all

    Firstname,Lastname,[email protected]
    Firstname,Lastname,[email protected]
    Firstname,Lastname,[email protected]
    Firstname,Lastname,[email protected]
    I need to move the email to the front of the line and leave the first and last names intact as such

    Code: Select all

    [email protected],Firstname,Lastname
    [email protected],Firstname,Lastname
    [email protected],Firstname,Lastname
    [email protected],Firstname,Lastname
    I have had no luck with doing the macro so far spent many hours trying different features, any help would be appreciated..

    Thanks in advance for any responses.

      Jan 24, 2006#2

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      Loop
      Find RegExp ","
      Find RegExp ","
      IfFound
      StartSelect
      Key END
      Cut
      Key HOME
      Paste
      ","
      Key HOME
      Key DEL
      Key END
      Else
      ExitLoop
      EndIf
      EndLoop
      Top
      UnixReOn

      //Works but its not pretty

      //Any Speed up pointers will be Much appreciated(No real need. This script did my address book in 30 seconds flat, but constructive critisim is always welcome)

      6,675585
      Grand MasterGrand Master
      6,675585

        Jan 24, 2006#3

        A simple regular expression replace in UltraEdit style will do the same:

        Find What: %^(*,*^),^(*^)$
        Replace With: ^2,^1
        Best regards from an UC/UE/UES for Windows user from Austria

        4
        NewbieNewbie
        4

          Jan 25, 2006#4

          wow

          Maybe somehow by luck I posted in the right forum looking for the wrong solution. Anyway, where can I find some sort of tutorial on regular expressions? I would like to know why how that worked rather than it just does. And the help file does not go into any type of detail.

          Thanks

          I understand the % begining of the line, but the ^ does not make sense to me which caracter is that skipping over? (*,* this makse sense to me like in unix command line it seems to simpley use anything','anything then there is the ^ and the carat which I don't understand.

          **EDIT**

          nevermind I think I have it all sorted out ... thanks for the post and helping me figure on a new way of doing this.