extended replace & line breaks?

Post here if your topic is about CSS HTML Validator but doesn't fit in another forum.
Post Reply
sagemaniac
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 4
Joined: Thu Jul 23, 2009 12:35 pm

extended replace & line breaks?

Post by sagemaniac »

Hi there,
[*]
first off, thanks for your work, CSE might just become my main editor ;).

One thing that really has kept me from switching to any other software from homesite (though I do have to use notepad2 for UTF-8 files):
I got really used to "extended replace" - being able to perform a replace on all open files or in specific folders recursively INCLUDING line breaks.

I don't think I can do this in CSE?

example:

replace
"[line break]
[tab]"

with
"</filename>[line break]
[tab]<filename>"

the result will be nice wrapping a list of words like so:

contentback.jpg</filename>
<filename>content.jpg</filename>
<filename>footer.jpg</filename>
<filename>left.jpg

best regards,
Richard
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3578
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: extended replace & line breaks?

Post by Albert Wiersch »

Hello,

There is a Search->Replace in All Open Documents function. Unfortunately there is no search/replace feature that can work given a folder. The documents have to be open in the editor.

Try searching for "\r\n\t" and replacing with "</filename>\r\n\t<filename>". Be sure to check the Regular expressions option.

I hope this helps. Please let me know how it works!
sagemaniac
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 4
Joined: Thu Jul 23, 2009 12:35 pm

Re: extended replace & line breaks?

Post by sagemaniac »

Working on open files is definitely safer then changing the content of whole directories. No problem there.
Albert Wiersch wrote:Try searching for "\r\n\t" and replacing with "</filename>\r\n\t<filename>". Be sure to check the Regular expressions option.
For some reason searching for "\r\n\t" did not work.
But when I select a line break and hit replace, I get a selection that looks like three empty squares.
This is pretty much the way regular replace worked in Homesite.

Replacing those with reg. expression on works just the way I need it to ;)

Thanks. CSE seems quite a bit more then just a validator.
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3578
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: extended replace & line breaks?

Post by Albert Wiersch »

sagemaniac wrote:For some reason searching for "\r\n\t" did not work.
But when I select a line break and hit replace, I get a selection that looks like three empty squares.
This is pretty much the way regular replace worked in Homesite.

Replacing those with reg. expression on works just the way I need it to ;)

Thanks. CSE seems quite a bit more then just a validator.
Are you using CSE HTML Validator v9.0x? The above was for v9.0. It may not work in previous versions.

Also, "\r\n" may be dependent on the text format. If it's a "Unix" format, then you may need to use just "\n" instead.

If the above doesn't help, please let me know in more detail what is happening. If I can reproduce the problem, then I should be able to find out why it is not working.

Or perhaps I misunderstood and it works when you check the Regular expressions option (which you need to do)? Thanks.
Post Reply