Patrick Coleman Posts:89
Send PM:
 |
| 26 Jul 2010 05:12 PM |
|
Hey John, I know this is an easy one so please refresh my memory. Is there any difference in the search and replace for text that is on the page versus a search and replace for Title, Description, and Keywords. For example: I want to search the title, description and keywords for all pages on my site for the words: Patrick Coleman and replace them with the words: John Smith. What would the search and replace look like to achieve this? Would it be a simple as adding something like this to portal rules: < searchFor >Patrick Coleman< /searchFor >< replaceWith >John Smith< /replaceWith > I know this would replace Patrick Coleman for all on page text but will it also change the Title, Description, and Keywords? Thanks, Pat |
|
| Changing the world one spine at a time - Chiropractic Websites |
|
|
| [AF:ADSENSE-728x90] |
John Mitchell
 Posts:4397
Administrator Send PM:
 |
| 27 Jul 2010 12:03 PM |
|
Yes, the complete page HTML("view page source") is available to PageBlaster for replacements. If you want to target only a specific place in the page and not others then you'll need a regex pattern to capture it.
|
|
|
|
|
Patrick Coleman Posts:89
Send PM:
 |
| 28 Aug 2010 08:56 AM |
|
Hey John, Thanks for confirming that for me. I ran into one snag that I am hoping you have a solution for. In my page title I used | as a separator between terms and one of the terms is the state abbreviation, e.g. MA for Massachusetts. Of course when I use a search and replace it replaces all occurrences of ma in all words throughout the site. So, I tried using "| MA" in the search for and WOW it returned a page full of garbage. So, I am hoping that you may have a solution for this. I have looked to find a regex that will search for capitals only but haven't found anything. I simply want to find all occurences of MA with a space before and after (if this helps) and replace it with two other letters (another state abbreviation). Thanks, Pat |
|
| Changing the world one spine at a time - Chiropractic Websites |
|
|
Patrick Coleman Posts:89
Send PM:
 |
| 28 Aug 2010 07:31 PM |
|
Hey John, I figured it out! After 3 years of using PB it is about time for me to start studying a bit of regex - so I spent a couple hours looking through it and now when I look at your regex I actually understand what it means...very cool! search [^a-z](MA) and replace with the new state abbreviation worked like a charm! Have an outstanding weekend. Pat |
|
| Changing the world one spine at a time - Chiropractic Websites |
|
|