Skip to main content
dublove
Legend
November 30, 2024
Question

Why does this regularity still match the second space?

I was trying to avoid starting with three consecutive spaces.
I stumbled upon this expression not working.
That is, I was trying to avoid the “what” line.

Is my regularity wrong?

This topic is closed to new replies. Start a new post to keep the conversation going.

8 replies

Peter Kahrel
Community Expert
Community Expert
November 30, 2024

To avvoid lines that start with three spaces, look for

^[^\h][^\h][^\h]

 

Translate
FRIdNGE
November 30, 2024

^\S{3}

 

(^/)  The Jedi

Translate
Robert at ID-Tasker
Legend
November 30, 2024

@dublove

 

What exactly are you trying to achieve? 

 

Remove those spaces? All of them or some? 

 

Replace them with something else? 

 

Remove whole line? 

 

Translate
Community Expert
November 30, 2024

It works fine for me

 

Don't know why it's so complicated - you could search for a single space (inserted by space bar) and it finds the same thing.

 

Can you elaborate or provide a larger sample set?

 

 

Translate