I have a code in each html page that I want to duplicate, while add some changes:
Example:
<title>Any text (even if includes :.,</title>
Output:
<title>Any text (even if includes :.,</title>
<meta name="description" content="Any text (even if includes :.,">
In other words, it takes anything in between the title tag, keep the title tag as is, and then add another line for the description tag under that line, that takes whatever inside the title tag (which here is:
Any text (even if includes :.,
which is everything inside the and the tags.
Thanks,
P.S. I use notepdad+ to search and replaxe
The following regex should match it.
The title’s text node will be available in the capturing group with the label
1.If your title possibly contains a
\n, then turn on dot matches\nor swap the.with[\s\S].