Page 1 of 1

copying data elsewhere inside html

Posted: Thu Feb 26, 2009 8:30 am
by nargiz
Hi,
I'm trying to copy part of data in the html file to elsewhere (inside <title></title> tags) in the same html file.

I have:
...
<title>Title</title>
</head>
<body>
text
<p class ="author">author, affiliation</p>
other text
</body>
...
and I need:
<title>Title, author</title>
</head>
<body>
text
<p class="author">author, affiliation</p>
other text
...


Really appreciate your help,
N

Re: copying data elsewhere inside html

Posted: Fri Feb 27, 2009 8:28 am
by DataMystic Support
Match EasyPattern:

Code: Select all

<title>[ capture(1+chars) as 'title' ]</title>
</head>
<body>
text
<p class ="author">[ capture(1+chars) as 'author'], affiliation</p>
other text
</body>
Replace with:

Code: Select all

<title>@title, @author</title>
</head>
<body>
text
<p class ="author">@author, affiliation</p>
other text
</body>