Text file editing

Discussion in 'other software & services' started by Dina, Sep 28, 2007.

Thread Status:
Not open for further replies.
  1. Dina

    Dina Registered Member

    Joined:
    Jul 28, 2006
    Posts:
    107
    hi

    i have text files which are formatted in double space. so it looks like this
    i want to replace the blank lines with some characters (i will use -separator- in this example. so it would look like this:

    anyone knows how this can be done? i have several files with thousands of lines so manual editing is not an option.

    i appreciate any help. thanks.
     
  2. SpikeyB

    SpikeyB Registered Member

    Joined:
    Mar 20, 2005
    Posts:
    479
    You might want to try this.

    Open the documents in MS Word and use search and replace

    search: ^l^l replace: ^l-separator-^l (you might need ^p in place of ^l, it depends if para breaks or hard returns were used, p.s. l as in london)

    Hope it works for you.
     
    Last edited: Sep 28, 2007
  3. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,219
    Hello,
    Are these files pure text or something else, like doc, odf?
    Regards,
    Mrk
     
  4. Dina

    Dina Registered Member

    Joined:
    Jul 28, 2006
    Posts:
    107
    @ Mrk

    theyre just plain text files.

    @ SpikeyB

    the ^p works pefectly. thank you.

    thank you both for the replies.

    :)
     
  5. Dina

    Dina Registered Member

    Joined:
    Jul 28, 2006
    Posts:
    107
    hi. i actually need to do some more text editing as above, with different variations.

    is there a place where this is documented? so i can learn the syntax myself?

    thank you again.

    good day.
     
  6. SpikeyB

    SpikeyB Registered Member

    Joined:
    Mar 20, 2005
    Posts:
    479
    I'm glad it worked for you Dina.

    The best way to find out is to go to the find and replace window. Click the more button then click the special button. Play around and select each of the special characters in turn to find its syntax.
     
  7. mizar

    mizar Registered Member

    Joined:
    Jul 26, 2006
    Posts:
    31
    Code:
    [SIZE="4"][COLOR="MediumTurquoise"][B]Add power to Word searches with regular expressions[/B][/COLOR][/SIZE]
    [URL="http://office.microsoft.com/en-us/help/HA010873051033.aspx"]http://office.microsoft.com/en-us/help/HA010873051033.aspx[/URL]
     
  8. Dina

    Dina Registered Member

    Joined:
    Jul 28, 2006
    Posts:
    107
    Thanks again for both your replies.

    Ive got everything sorted out now.

    cheers :)
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.