PC Review


Reply
Thread Tools Rate Thread

How do I replace HTML tags without changing the text?

 
 
=?Utf-8?B?VG9tIE0=?=
Guest
Posts: n/a
 
      16th Dec 2005
I am trying to replace a tag such as <p class="Name">Title of Page</p>

with <span class="Header">Title of Page</span>

The problem is that the text inside the tags, ie "Title of Page" varies over
the 500 pages that I need to change it. I am wondering if there are wildcard
characters that I can use with Find/Replace to preserve the text inbetween
the tags while changing the tags on all the pages at once.

I know that I can just change the opening tag, or change both tags while
deleting the text but I want to save the time of either replacing the closing
</span> tag or retyping the text inside the text. I remember doing something
similar before and I thought that I could use asterisks but that is not
working in FP 2003 and I do not remember exactly what I did.

Thanks in advance for any help.
 
Reply With Quote
 
 
 
 
Steve Easton
Guest
Posts: n/a
 
      16th Dec 2005
You don't need to search and replace the entire tag, you can just search and
replace a portion of it like this.

Search for : <p class="Name">

Replace with: <span class="Header">

hth


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer




"Tom M" <Tom (E-Mail Removed)> wrote in message
news:3A3E2D77-0AA6-453D-9C06-(E-Mail Removed)...
>I am trying to replace a tag such as <p class="Name">Title of Page</p>
>
> with <span class="Header">Title of Page</span>
>
> The problem is that the text inside the tags, ie "Title of Page" varies
> over
> the 500 pages that I need to change it. I am wondering if there are
> wildcard
> characters that I can use with Find/Replace to preserve the text inbetween
> the tags while changing the tags on all the pages at once.
>
> I know that I can just change the opening tag, or change both tags while
> deleting the text but I want to save the time of either replacing the
> closing
> </span> tag or retyping the text inside the text. I remember doing
> something
> similar before and I thought that I could use asterisks but that is not
> working in FP 2003 and I do not remember exactly what I did.
>
> Thanks in advance for any help.



 
Reply With Quote
 
=?Utf-8?B?VG9tIE0=?=
Guest
Posts: n/a
 
      16th Dec 2005
Thanks, but I already know this. The problem is I will still need to replace
all the </p> tags across every page. However, since that tag is used in
multiple instances, I would need to do it manually which is why I am
wondering if there is some way to ignore the text between the tags and
perform the find/replace in one operation.

"Steve Easton" wrote:

> You don't need to search and replace the entire tag, you can just search and
> replace a portion of it like this.
>
> Search for : <p class="Name">
>
> Replace with: <span class="Header">
>
> hth
>
>
> --
> Steve Easton
> Microsoft MVP FrontPage
> 95isalive
> This site is best viewed............
> ........................with a computer
>
>
>
>
> "Tom M" <Tom (E-Mail Removed)> wrote in message
> news:3A3E2D77-0AA6-453D-9C06-(E-Mail Removed)...
> >I am trying to replace a tag such as <p class="Name">Title of Page</p>
> >
> > with <span class="Header">Title of Page</span>
> >
> > The problem is that the text inside the tags, ie "Title of Page" varies
> > over
> > the 500 pages that I need to change it. I am wondering if there are
> > wildcard
> > characters that I can use with Find/Replace to preserve the text inbetween
> > the tags while changing the tags on all the pages at once.
> >
> > I know that I can just change the opening tag, or change both tags while
> > deleting the text but I want to save the time of either replacing the
> > closing
> > </span> tag or retyping the text inside the text. I remember doing
> > something
> > similar before and I thought that I could use asterisks but that is not
> > working in FP 2003 and I do not remember exactly what I did.
> >
> > Thanks in advance for any help.

>
>
>

 
Reply With Quote
 
Andrew Murray
Guest
Posts: n/a
 
      16th Dec 2005
Then search and replace </p> with </span> ????

Usually the search and replace routine will prompt at every occurence of the
string to be replaced with a "Replace Y/N?" option rather than just doing
the lot and not giving you the choice.


"Tom M" <(E-Mail Removed)> wrote in message
news:CA8CEE24-6870-475E-BEAE-(E-Mail Removed)...
> Thanks, but I already know this. The problem is I will still need to
> replace
> all the </p> tags across every page. However, since that tag is used in
> multiple instances, I would need to do it manually which is why I am
> wondering if there is some way to ignore the text between the tags and
> perform the find/replace in one operation.
>
> "Steve Easton" wrote:
>
>> You don't need to search and replace the entire tag, you can just search
>> and
>> replace a portion of it like this.
>>
>> Search for : <p class="Name">
>>
>> Replace with: <span class="Header">
>>
>> hth
>>
>>
>> --
>> Steve Easton
>> Microsoft MVP FrontPage
>> 95isalive
>> This site is best viewed............
>> ........................with a computer
>>
>>
>>
>>
>> "Tom M" <Tom (E-Mail Removed)> wrote in message
>> news:3A3E2D77-0AA6-453D-9C06-(E-Mail Removed)...
>> >I am trying to replace a tag such as <p class="Name">Title of Page</p>
>> >
>> > with <span class="Header">Title of Page</span>
>> >
>> > The problem is that the text inside the tags, ie "Title of Page" varies
>> > over
>> > the 500 pages that I need to change it. I am wondering if there are
>> > wildcard
>> > characters that I can use with Find/Replace to preserve the text
>> > inbetween
>> > the tags while changing the tags on all the pages at once.
>> >
>> > I know that I can just change the opening tag, or change both tags
>> > while
>> > deleting the text but I want to save the time of either replacing the
>> > closing
>> > </span> tag or retyping the text inside the text. I remember doing
>> > something
>> > similar before and I thought that I could use asterisks but that is not
>> > working in FP 2003 and I do not remember exactly what I did.
>> >
>> > Thanks in advance for any help.

>>
>>
>>



 
Reply With Quote
 
Stefan B Rusynko
Guest
Posts: n/a
 
      16th Dec 2005
That will destroy any other valid <p> tags

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPa...3/Default.aspx
_____________________________________________


"Andrew Murray" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
| Then search and replace </p> with </span> ????
|
| Usually the search and replace routine will prompt at every occurence of the
| string to be replaced with a "Replace Y/N?" option rather than just doing
| the lot and not giving you the choice.
|
|
| "Tom M" <(E-Mail Removed)> wrote in message
| news:CA8CEE24-6870-475E-BEAE-(E-Mail Removed)...
| > Thanks, but I already know this. The problem is I will still need to
| > replace
| > all the </p> tags across every page. However, since that tag is used in
| > multiple instances, I would need to do it manually which is why I am
| > wondering if there is some way to ignore the text between the tags and
| > perform the find/replace in one operation.
| >
| > "Steve Easton" wrote:
| >
| >> You don't need to search and replace the entire tag, you can just search
| >> and
| >> replace a portion of it like this.
| >>
| >> Search for : <p class="Name">
| >>
| >> Replace with: <span class="Header">
| >>
| >> hth
| >>
| >>
| >> --
| >> Steve Easton
| >> Microsoft MVP FrontPage
| >> 95isalive
| >> This site is best viewed............
| >> ........................with a computer
| >>
| >>
| >>
| >>
| >> "Tom M" <Tom (E-Mail Removed)> wrote in message
| >> news:3A3E2D77-0AA6-453D-9C06-(E-Mail Removed)...
| >> >I am trying to replace a tag such as <p class="Name">Title of Page</p>
| >> >
| >> > with <span class="Header">Title of Page</span>
| >> >
| >> > The problem is that the text inside the tags, ie "Title of Page" varies
| >> > over
| >> > the 500 pages that I need to change it. I am wondering if there are
| >> > wildcard
| >> > characters that I can use with Find/Replace to preserve the text
| >> > inbetween
| >> > the tags while changing the tags on all the pages at once.
| >> >
| >> > I know that I can just change the opening tag, or change both tags
| >> > while
| >> > deleting the text but I want to save the time of either replacing the
| >> > closing
| >> > </span> tag or retyping the text inside the text. I remember doing
| >> > something
| >> > similar before and I thought that I could use asterisks but that is not
| >> > working in FP 2003 and I do not remember exactly what I did.
| >> >
| >> > Thanks in advance for any help.
| >>
| >>
| >>
|
|


 
Reply With Quote
 
Stefan B Rusynko
Guest
Posts: n/a
 
      16th Dec 2005
In S&R, use the Html tag tab (replace tag <p> w/ tag <span>) w/ a Html rule to only find <p> tags w/ your class attribute

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPa...3/Default.aspx
_____________________________________________


"Tom M" <Tom (E-Mail Removed)> wrote in message news:3A3E2D77-0AA6-453D-9C06-(E-Mail Removed)...
|I am trying to replace a tag such as <p class="Name">Title of Page</p>
|
| with <span class="Header">Title of Page</span>
|
| The problem is that the text inside the tags, ie "Title of Page" varies over
| the 500 pages that I need to change it. I am wondering if there are wildcard
| characters that I can use with Find/Replace to preserve the text inbetween
| the tags while changing the tags on all the pages at once.
|
| I know that I can just change the opening tag, or change both tags while
| deleting the text but I want to save the time of either replacing the closing
| </span> tag or retyping the text inside the text. I remember doing something
| similar before and I thought that I could use asterisks but that is not
| working in FP 2003 and I do not remember exactly what I did.
|
| Thanks in advance for any help.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search and replace HTML tags in Word 2003 Ken Springer Microsoft Word Document Management 2 27th Dec 2009 08:06 PM
Replace HTML tags =?Utf-8?B?UmljaGFyZCBTdGVlbGUgKEJhc2VtYXAp?= Microsoft C# .NET 3 20th Apr 2005 12:31 PM
RegEx : Match and replace term within HTML tags mike c Microsoft C# .NET 1 13th Apr 2004 12:01 PM
search and replace in outlook <html> tags Tony Microsoft Outlook Discussion 0 23rd Jul 2003 10:50 PM
search and replace in outlook <html> tags Tony Microsoft Outlook 0 23rd Jul 2003 05:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:30 PM.