PhpStorm new line in HTML replace

BeNice

For over a year I have been trying to do the simplest thing - do an HTLM/PHP search and replace in several files.

For exapmle if I want to replace

<!DOCTYPE html>

with

<!DOCTYPE html>
<!--
TODO UNIVERSAL
Favicon
Page title
Active page
-->

I get

<!DOCTYPE html> <!--     TODO UNIVERSAL     Favicon     Page title     Active page   -->

I realize search and replace is probably considered old fashioned but I have found it an incredibly useful tool for 30 years.

I have scoured JetBrains web site with no avail and searched here and elsewhere.

I have tried /n, \n, \\n, \\n\\r etc etc and nothing seems to work.

I am sure I am being a dunce but could some other PhpStorm user please enlighten me.

LazyOne

Search for:

\<\!DOCTYPE HTML\>

Replace with:

\<\!DOCTYPE html\>\n\<\!\-\-\nTODO UNIVERSAL\nFavicon\nPage title\nActive page\n\-\-\>

Make sure that Regex option is checked

enter image description here

(here on screenshot you see the result of such replacement)


P.S. PhpStorm (and other IDEA-based IDEs) uses \n internally (while editing) for all line endings. And then, when saving, it uses detected/proper line ending.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to replace `\n` with new line when print as <pre> in HTML?

From Dev

Replace a character with new line

From Dev

sed to replace comma and new line

From Dev

Bat replace new line char to "|"

From Dev

Replace Space with New Line in Python

From Dev

Replace string with a new line in Batch

From Dev

bash - replace space with new line

From Dev

How to replace a word with new line

From Dev

Replace string with a new line in Batch

From Dev

ASP Label Replace new line

From Dev

replace dots with new line with regex

From Dev

Replace line in text file with a new line

From Dev

Replace line in text file with a new line

From Dev

Replace string in line without adding new line?

From Dev

Replace Multiple New Lines in One New Line

From Dev

New line in html table

From Dev

HTML New Line with Bootstrap

From Dev

new line in HTML

From Dev

New line in html table

From Dev

Regex PHP to find and replace white space and,or new line between HTML tags

From Dev

Using regex to replace characters between two strings while ignoring html tags and new line breaks

From Dev

Replace new line + 4x space to new line in stdout

From Dev

How to reformat code associative array in new line in PhpStorm?

From Dev

Put each tag on a new line when wrapping with Emmet in PhpStorm

From Dev

How to replace a line that starts with a word (and use that old line on the new line)

From Java

Replace \n with actual new line in Sublime Text

From Dev

Replace \n(new line) with space in bash

From Dev

replace every other space with new line

From Dev

how to replace new line to empty space on coldfusion