> Look at the remove function. It can remove a fixed number of characters from > the beginning or end of a string. > > Again, using a regular expression might be easier. > > The following would remove "Amazon.com: " from the beginning and " - Mozilla > Firefox" from the end if either or both is found: > > sTitle = regex.pcrereplace ;;+ > (?"^Amazon.com: | - Mozilla Firefox$", sTitle, "") > > The two could be combined, illegal file name characters and the amazon, > firefox stuff: > > sTitle = regex.pcrereplace ;;+ > (?"^Amazon.com: | - Mozilla Firefox$|[\?\\/*\x22<>|]", sTitle, "") > > Then you could use sTitle++".txt" instead of sEditedSubDomain++".txt" for the > file name. > > Regards, > Sheri >
Thank you for the in depth reply to my question. But so far I spent an hour manipulating things to see if they would work but was not able to get it running. Kept getting an error message. Is there anyway you could make the script complete? I consider myself a pretty good hack at getting many things to work with PPro but for some reason this is beyond me. Not sure if it is something misplaced in your coding or not since as a novice I can grasp what your doing but not how. A question about the sTitle with the regex. If in the future I wanted to add more to the front? IE: (?"^Blockbuster.com | ^Buyhere - | ^Amazon.com: | - Mozilla Firefox$|[\?\\/*\x22<>|]", sTitle, "") If you help again all I can say is thanks. -nick
