[PLUG] Identifying white space in text files [RESOLVED]

Richard Owlett rowlett at access.net
Tue Dec 24 16:44:11 UTC 2024


On 12/24/24 10:29 AM, Ben Koenig wrote:
> On Tuesday, December 24th, 2024 at 7:04 AM, Richard Owlett <rowlett at access.net> wrote:
> 
>> On 12/24/24 8:43 AM, Rich Shepard wrote:
>>
>>> On Tue, 24 Dec 2024, Rich Shepard wrote:
>>>
>>>> Converting between spaces and tabs is easily done with sed, and that's
>>>> what
>>>> my web searches show. But, I don't recall a tool that will tell me
>>>> whether
>>>> the white spaces in a text file are spaces or a tab, and that's not
>>>> showing
>>>> up in my web search. How's it done?
>>>
>>> Fugeddaboutit, gawk treats all white spaces as a single space so it don't
>>> matter.
>>>
>>> I have a PDF file with three columns: First, Last, and Company. When I use
>>> pdftotext I end up with a single column: all first names, a space, all last
>>> names, a space, all company names rather than rows with three fields. I've
>>> no idea what software produced the PDF but now I need to figure out how to
>>> convert the columns to rows. I'm sure emacs' rectangle commands will do
>>> this
>>> so that's what I'll use until I get it right.
>>>
>>> Rich
>>
>>
>> Try looking at the file with GHEX - GNOME Hex editor for files.
>> HTH
> 
> IIRC the regex pattern for whitespace is \s. This matches all whitespace characters, tabs or otherwise.
> 
> 

So? ?? ;}
GHEX has two panes. One with characters. One with the actual hex value 
of each location in the file. IIUC OP wants to be able to distinguish 
multiple space characters from a single tab character.



> -Ben
> 



More information about the PLUG mailing list