Professional Web Applications Themes

tab delimited text - Macromedia Director Lingo

Hi, Im writing a very simple pr for a tab delimited text file. I need to find a way to get rid of the tab space (white space) around each item delimiter. I've tried including the whitespace as the itemDelimiter, but it doesnt work properly. Does anyone have an idea? Thanks JAcob...

  1. #1

    Default tab delimited text

    Hi,
    Im writing a very simple pr for a tab delimited text file. I need to
    find a way to get rid of the tab space (white space) around each item
    delimiter. I've tried including the whitespace as the itemDelimiter, but it
    doesnt work properly.
    Does anyone have an idea?
    Thanks
    JAcob


    Jacob Farber Guest

  2. #2

    Default Re: tab delimited text

    To eliminate leading and trailing spaces from a block of text
    ( proably not what you were looking for )

    testText = " some text "

    put word 1 to ( the number of words in testTex) of testText

    "some text"
    JB Guest

  3. #3

    Default Re: tab delimited text

    put this little handler in a movie script

    on replace oldChunk, newChunk, inText
    found = 1
    repeat while found
    found = offset(oldChunk,inText)
    if found > 0 then
    if found = 1 then
    inText= newChunk & inText.char[oldChunk.char.count +
    1..inText.char.count]
    else
    -- watch out for newsreader linewrap !
    inText=inText.char[1..found-1]& newChunk & inText.char[found +
    oldChunk.char.count..inText.char.count]
    end if
    end if
    end repeat
    return inText
    end

    and use anywhere you want :

    -- tab remove
    myText = replace(TAB, "", myText)
    -- tab replace by space
    myText = replace(TAB, " ", myText)
    -- replace "Tom" by "Jerry"
    myText = replace("Tom, "Jerry", myText)

    otherwise for more powerfull & faster solution, for larger amounts of text,
    you can use the free PRegEx xtra that allow regular expressions calls
    hth
    --
    ----------------
    -- Ned
    ----------------------------------------
    Bien faire et laisser braire
    ----------------------------------------
    "Jacob Farber" <jacobfarbersympatico.ca> a écrit dans le message de
    news:bq7vo1$org$1forums.macromedia.com...
    | Hi,
    | Im writing a very simple pr for a tab delimited text file. I need to
    | find a way to get rid of the tab space (white space) around each item
    | delimiter. I've tried including the whitespace as the itemDelimiter, but
    it
    | doesnt work properly.
    | Does anyone have an idea?
    | Thanks
    | JAcob
    |
    |


    Ned Guest

  4. Moderated Post

    Default Re: tab delimited text

    Removed by Administrator
    Jacob Farber Guest
    Moderated Post

  5. Moderated Post

    Default Re: tab delimited text

    Removed by Administrator
    Ned Guest
    Moderated Post

Similar Threads

  1. Excel annoyance - why quotes around some data when saving as tab-delimited text?
    By yvan@ideasdesign.com in forum Macromedia ColdFusion
    Replies: 0
    Last Post: March 8th, 02:56 PM
  2. Delimited Text to HTML Table
    By JR in forum PERL Modules
    Replies: 0
    Last Post: May 19th, 04:51 PM
  3. Tab-delimited or CSV - Performance difference???
    By Laphan in forum ASP Database
    Replies: 5
    Last Post: August 30th, 06:05 PM
  4. split a tab delimited string
    By Ajit in forum ASP.NET General
    Replies: 6
    Last Post: July 29th, 03:32 PM
  5. generate CSV or comma delimited
    By shank in forum ASP
    Replies: 4
    Last Post: July 9th, 04:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139