Sublime Forum

Delete all the line starting with the string "!"

#1

In find and select is there a command to delete all the line starting with the string “!”
Thank you

0 Likes

#2

Something like this, perhaps ?

0 Likes

#3

It would be better to begin the find expression with ^ which is the regex character for beginning of line, Thus,

^!.*
should do it. If you ommit ^ it could find a ! that was not at the beginning of the line. If you want to work at the end of the line, $ is the regex character for end of line.

i

0 Likes

#4

Yes. Your regex is more specific and better. Just did not put too much thought into it :slight_smile:

0 Likes

#5

thank you very much. It work fine.
Is there a manual for working with sublime text search and regex character?

0 Likes