I am using the block select mode to select and remove all of the carriage returns in a block. I tried to replace them using the regex \n and keeping the replace space blank, but I get a message "Cannot find regular expression '\n'". I have the Regular expression checked in the replace window. I have also tried the join lines tool but that joins all of the lines spanned by the block, not just the selected carriage returns.
Is there a way to get the \n regex recognized in block select mode?
Todd
Regex and block select mode
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Carlyle Sutphen
Re: Regex and block select mode
Hi, Todd.
That's not working because block mode basically only sees spaces where the block extends beyond the end of the line.
It looks like you want to join lines shorter than a certain length to it's following line.
In the case that the maximum line length you want to join to it's follower is 14, you could
find: ^(.{1,14})\n
and
replace: \1
Carlyle
That's not working because block mode basically only sees spaces where the block extends beyond the end of the line.
It looks like you want to join lines shorter than a certain length to it's following line.
In the case that the maximum line length you want to join to it's follower is 14, you could
find: ^(.{1,14})\n
and
replace: \1
Carlyle
-
Roy Beatty
Re: Regex and block select mode
Unless you're using POSIX-optioned regex, he meant to say:
find: ^\(.\{1,14\}\)\n<br>
and<br>
replace: \1
find: ^\(.\{1,14\}\)\n<br>
and<br>
replace: \1