You are here: PSPad forum > English discussion forum > Re: Insert line break before capitol letter?

Re: Insert line break before capitol letter?

#1 Insert line break before capitol letter?

Posted by: kleerkoat | Date: 04/22/2012 22:30 | IP: IP Logged

How can a take a line of text like this:

DogCatBirdLizardSpider

and get:

Dog
Cat
Bird
Lizard
Spider

thanks in advance, I did a search but couldn't find anything. thank you again.

Options: Reply | Quote | Up ^


#2 Re: Insert line break before capitol letter?

Posted by: pspad | Date: 04/23/2012 06:14 | IP: IP Logged

Go to end of the file
Use regular expression in search/replace

Search for: ^([A-Z])
Replace: \n$+
[x]Case sensitive
[x]Regular expressions
[x]Backward direction

Edited 1 time(s). Last edit at 04/23/2012 06:14 by pspad.

Options: Reply | Quote | Up ^


#3 Re: Insert line break before capitol letter?

Posted by: myf | Date: 04/23/2012 09:01 | IP: IP Logged

imho should have been
Search for: [A-Z]
Replace: \n$0

Options: Reply | Quote | Up ^


#4 Re: Insert line break before capitol letter?

Posted by: pspad | Date: 04/23/2012 09:34 | IP: IP Logged

Without ^ on the begin of expression it will replace all upper case with new line winking smiley

Options: Reply | Quote | Up ^


#5 Re: Insert line break before capitol letter?

Posted by: kleerkoat | Date: 04/23/2012 16:06 | IP: IP Logged

excellent! thank you very much.

now I'm going to look into what all that means!

thanks again.

Options: Reply | Quote | Up ^


#6 Re: Insert line break before capitol letter?

Posted by: kleerkoat | Date: 04/25/2012 04:56 | IP: IP Logged

hmm, @pspad, I couldn't get yours to work. I replaced it with what myf suggested and it worked perfectly.

thanks again.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2014 Jan Fiala
Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák