Re: extracting the text out of a binary file

Tech-Archive recommends: Speed Up your PC by fixing your registry



You can filter the string to just accept range of the numbers and letters.
ASCII table: http://www.lookuptables.com/
But why do you read binary files using text file methods?


--
Saber S.
"RSH" <way_beyond_oops@xxxxxxxxx> wrote in message
news:OyIi6tcmFHA.3960@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I have quite a few .DAT data files that i need to extract the data out of.
> When i open the files in a text editor I see all of the text that I need
> to get at BUT there are a lot of junk (binary?) characters and white space
> in non logical formatting positions.
>
> Here is a small sample of what the data looks like:
>
> 0~ 0501101010512505011132451235 >   ô ô  
> X 3> Bô
>  
>
> MICHAEL B SMITH, DVM PC 123 MAIN ST., STE 600 DALLAS, TX 75252
> MICHAEL SMITH Õ
> s ' 'MICHAEL B NORTON, DVM PC 123 MAIN ST., STE 600 DALLAS, TX
> 75252 ÌZkM Ô 
> Bô
> < Ô ' Ò '
>  ' 
> '  ' '  ' â ' Bô
>  -D Õ  â ' Bô
>
>
> Is it possible to filter out all the junk characters and just get at the
> text? If so could you provide a sample of how?
>
> I tried doing a string replace but the number of characters in the array
> were getting way out of control. I was wondering if the binaryreader
> class might be what I'm looking for but I have no idea on what that really
> does.
>
> Thanks!
> RSH
>


.



Relevant Pages

  • Re: String filtering
    ... > unwanted characters from a string. ... > string and want to filter out of it all characters not in 'a'..'z', ... Delete(source, deleteIndex); ...
    (comp.lang.ada)
  • Form Filter length limitation
    ... 2400 characters into the form filter property. ... So as a workaround I tried to place the filter in a global string variable. ...
    (microsoft.public.access.formscoding)
  • Re: extracting the text out of a binary file
    ... Dim newStr As String ... > unfortunately there are thousands of useless characters with the text. ... I was wondering if the binaryreader ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Get words. Suggestions to improve code.
    ... I am trying to get all the words in a phrase and then filter the ones ... My selecting only the ones longer then three characters I ignore ... threads called "At least one space...", Alberto Poblacion gave you a regex string that would check word count. ...
    (microsoft.public.dotnet.languages.csharp)
  • IF Function - Begins With
    ... How do I apply the "begins with" filter to an IF statement? ... like to test a match on the first 3 characters of a string in a given ... Prev by Date: ...
    (microsoft.public.excel.misc)