help about this regex
-
hi everybody,
i’ve make my first simply regex
find:(?-s)(.*\r?\n){5}\K
replace:\n\n\n
this code insert 3 blank lines each 5 text lines
but need to have the caret at the at the beginning of the first line of entire document … when i run another macro i have the caret to EOF and regex does not work
so, how to edit this regex to work also with caret on EOF ? -
@namx3249 said in help about this regex:
replace: \n\n\n
Be careful, there…you may not get the line-endings you truly want…or maybe you will; not sure of your intention.
-
@namx3249 said in help about this regex:
how to edit this regex to work also with caret on EOF ?
You can’t build the “starting point” into the find expression.
If you want to do the whole document at once (top to bottom), then checkmark Wrap around and use Replace All.If it is to be part of a macro, putting Ctrl+Home in the macro before the replacement is also an option, I suppose.
-
oh nice !
Wrap around solved my issue.
thank you for the tip, Alan -
This post is deleted! -
This post is deleted!