Skip to main content
dublove
Legend
Nov 30, 2024 12:32 PM UTC
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
Nov 30, 2024 2:48 PM UTC

To avvoid lines that start with three spaces, look for

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

 

Translate
FRIdNGE
Nov 30, 2024 3:36 PM UTC

^\S{3}

 

(^/)  The Jedi

Translate
Robert at ID-Tasker
Legend
Nov 30, 2024 2:03 PM UTC

@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
Nov 30, 2024 1:41 PM UTC

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