Wildcard syntax problem...
Posted: Sat Aug 25, 2007 11:28 am
I am working on optimizing some of my web pages for SEO. I need to add in my keywords to the urls within my html files.
I need to change this...
<a href="http://www.mysite.com/States/Cities/Gre ... htm">Green Valley Lake</a>
<a href="http://www.mysite.com/States/Cities/Lyoth.htm">Lyoth</a>
<a href="http://www.mysite.com/States/Cities/Ing ... glewood</a>
<a href="http://www.mysite.com/States/Cities/Pin ... .htm">Pine Grove</a>
<a href="http://www.mysite.com/States/Cities/Cer ... erritos</a>
<a href="http://www.mysite.com/States/Cities/Val ... Vallejo</a>
<a href="http://www.mysite.com/States/Cities/Mou ... htm">Mount Laguna</a>
<a href="http://www.mysite.com/States/Cities/Campo.htm">Campo</a>
<a href="http://www.mysite.com/States/Cities/For ... Fortuna</a>
to this...
<a href="http://www.mysite.com/States/Cities/CA- ... htm">Green Valley Lake</a>
<a href="http://www.mysite.com/States/Cities/CA- ... ">Lyoth</a>
<a href="http://www.mysite.com/States/Cities/CA- ... glewood</a>
<a href="http://www.mysite.com/States/Cities/CA- ... .htm">Pine Grove</a>
<a href="http://www.mysite.com/States/Cities/CA- ... erritos</a>
<a href="http://www.mysite.com/States/Cities/CA- ... Vallejo</a>
<a href="http://www.mysite.com/States/Cities/CA- ... htm">Mount Laguna</a>
<a href="http://www.mysite.com/States/Cities/CA- ... ">Campo</a>
<a href="http://www.mysite.com/States/Cities/CA- ... Fortuna</a>
and this is what I tried with no luck...
"text to find"
<a href="http://www.mysite.com/States/Cities/(.+).htm">Green Valley Lake</a>
"replace with"
<a href="http://www.mysite.com/States/Cities/CA- ... htm">Green Valley Lake</a>
I have no idea if the syntax is right. I am assuming that "(.+)" will copy the "Green-Valley-Lake" string from my example above and then "($1)" will write the string, "Green-Valley-Lake," to my output file. Is this correct? I also do not know anything about the modifiers either. Everything I've learned has been from the examples in the forums. Thanks for any help you can give!
I need to change this...
<a href="http://www.mysite.com/States/Cities/Gre ... htm">Green Valley Lake</a>
<a href="http://www.mysite.com/States/Cities/Lyoth.htm">Lyoth</a>
<a href="http://www.mysite.com/States/Cities/Ing ... glewood</a>
<a href="http://www.mysite.com/States/Cities/Pin ... .htm">Pine Grove</a>
<a href="http://www.mysite.com/States/Cities/Cer ... erritos</a>
<a href="http://www.mysite.com/States/Cities/Val ... Vallejo</a>
<a href="http://www.mysite.com/States/Cities/Mou ... htm">Mount Laguna</a>
<a href="http://www.mysite.com/States/Cities/Campo.htm">Campo</a>
<a href="http://www.mysite.com/States/Cities/For ... Fortuna</a>
to this...
<a href="http://www.mysite.com/States/Cities/CA- ... htm">Green Valley Lake</a>
<a href="http://www.mysite.com/States/Cities/CA- ... ">Lyoth</a>
<a href="http://www.mysite.com/States/Cities/CA- ... glewood</a>
<a href="http://www.mysite.com/States/Cities/CA- ... .htm">Pine Grove</a>
<a href="http://www.mysite.com/States/Cities/CA- ... erritos</a>
<a href="http://www.mysite.com/States/Cities/CA- ... Vallejo</a>
<a href="http://www.mysite.com/States/Cities/CA- ... htm">Mount Laguna</a>
<a href="http://www.mysite.com/States/Cities/CA- ... ">Campo</a>
<a href="http://www.mysite.com/States/Cities/CA- ... Fortuna</a>
and this is what I tried with no luck...
"text to find"
<a href="http://www.mysite.com/States/Cities/(.+).htm">Green Valley Lake</a>
"replace with"
<a href="http://www.mysite.com/States/Cities/CA- ... htm">Green Valley Lake</a>
I have no idea if the syntax is right. I am assuming that "(.+)" will copy the "Green-Valley-Lake" string from my example above and then "($1)" will write the string, "Green-Valley-Lake," to my output file. Is this correct? I also do not know anything about the modifiers either. Everything I've learned has been from the examples in the forums. Thanks for any help you can give!