Here is a sample text to test the regex you want to build :
this line doesn't begin with a space
this line begins with a space and the previous line doesn't end with =
this line begins with a space and the previous line ends with =
The set of characters [a-zA-Z]
can be expressed with the atom \a
.
So your regex can be rewritten like this :
^ .*.\a.*
Now your regex uses the ^
character, which stands for a beginning of a line. The problem is it can only be used at the beginning of the regex. To describe a beginning of line anywhere inside the regex, you have to use \_^
.
Finally, you don't want the previous line to begin with the character =
.
This can be expressed with the following regex (in very magic mode) :
(\=\n)@<!
The end result is :
(\=\n)@<!\_^ .*.\a.*
Or if you want to be sure the very magic mode is enabled :
\v(\=\n)@<!\_^ .*.\a.*