Cannot find or replace two or more spaces

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
colemarc
Posts: 2
Joined: Thu Mar 20, 2025 11:03 pm

Cannot find or replace two or more spaces

Post by colemarc »

This is disconcerting.

I have a pretty normal text file containing spaces.
If I search (F5) for a single space it finds all the instances.
If I search for two or more consecutive spaces it does not find anything, but I am pretty sure there are consecutive spaces.
If instead of pressing the space bar twice I copy-paste two consecutive spaces from the text then it finds them.

Same for Replace (F8).

1.png
1.png (18.81 KiB) Viewed 1625 times
3.png
3.png (26.52 KiB) Viewed 1624 times
2.png
2.png (15.25 KiB) Viewed 1625 times
User avatar
bbadmin
Site Admin
Posts: 948
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Re: Cannot find or replace two or more spaces

Post by bbadmin »

Seems likely that some of your space characters are tabs. You can easily confirm that by turning on visible spaces.

To find one or more mixed space characters, search for "\s+" and turn on regular expressions.
colemarc
Posts: 2
Joined: Thu Mar 20, 2025 11:03 pm

Re: Cannot find or replace two or more spaces

Post by colemarc »

I thought so, but I was confused because it seemed that one space would find them all.
Now I cannot reproduce the problem in another file, therefore you are most likely right.

Thank you
Post Reply