parsing ?

Results 1 to 2 of 2

Thread: parsing ?

  1. #1
    Join Date
    Dec 1969

    Default parsing ?

    I need to parse a file.<BR>It has a minimum of one space beteen 2 words. But the space can be even more than 2 spaces..sometomes 5 spaces. In other words, the spacing is inconsistent.<BR>Can anybody let me know how can I parse the given line:<BR>Ex:<BR>animal eating grass<BR>animal1 eating grass<BR>animal1 eating grass<BR>Currently, I&#039;m doing this stmt:<BR>arr =Split("strline1," ")<BR><BR>Can anybody give me more ideas so that I can parse lines like above....?<BR><BR>Thanks,<BR>

  2. #2
    Join Date
    Dec 1969

    Default Remove the spaces

    Like this: <BR><BR>Function RemoveSpaces(strInput)<BR> For i = 0 to 10<BR> strInput = Replace(strInput," "," ")<BR> Next<BR> RemoveSpaces = strInput<BR>End Function<BR><BR>then you would just do this in your code to call the function: <BR><BR>strLine1 = RemoveSpaces(strLine1)<BR>

Posting Permissions

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