Hi Ronald, Thanks for your willingness to help. However, I figured it out so now I will provide the answer that I used.
I used the lookahead regex. This helped me to not match something that has http: or / when those matches came up I then just added my http://www.domain.com/ to the matches. This gave me a complete absolute link. Here is the regex I used: <a href=""(?!http:|/)([^""]+)"" Here is the replacement I used: <a href=""http://www.mydomain.com/\1"" Blessings to you, Randal Watkins ************************************** "The Herbs Place" for People and Pets Supplements, Herbs, Essential Oils, and More! http://www.theherbsplace.com <a href="http://www.theherbsplace.com"> The Herbs Place </a> ************************************** > From: Ronald J Kimball <[EMAIL PROTECTED]> > Reply-To: BBEdit-Talk List <[email protected]> > Date: Thu, 19 Apr 2007 12:03:42 -0400 > To: BBEdit-Talk List <[email protected]> > Subject: Re: Grep Question on Excluding > > On Thu, Apr 19, 2007 at 08:31:01AM -0400, The Herbs Place wrote: >> >> Hello, >> >> I have several thousand relative links with or without slashes in the >> front and already corrected absolute links. >> >> I used this pattern with a slash: >> >> <a href=""/([^>""]*)"">([^<]*) and this was the replace pattern >> >> <a href=""http://mydomain.com/\1""> >> >> This works fine if the link has no http://mydomain.com/ in front of it >> already. >> >> So, I was wondering how I could incorporate a test for >> >> 1. not changing the link if the http://mydomain.com/ prefix is present >> already >> 2. no slashes in front of the relative file link and if it is present >> perform the update with a slash being added to http://mydomain.com >> prefix. > > I'm having trouble understanding exactly what it is you're trying to do. > Could you provide some before&after examples showing what you want to > change and what you don't want to change? > > Ronald > > -- > ------------------------------------------------------------------ > Have a feature request? Not sure the software's working correctly? > If so, please send mail to <[EMAIL PROTECTED]>, not to the list. > List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml> > List archives: <http://www.listsearch.com/BBEditTalk.lasso> > To unsubscribe, send mail to: <[EMAIL PROTECTED]> > -- ------------------------------------------------------------------ Have a feature request? Not sure the software's working correctly? If so, please send mail to <[EMAIL PROTECTED]>, not to the list. List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml> List archives: <http://www.listsearch.com/BBEditTalk.lasso> To unsubscribe, send mail to: <[EMAIL PROTECTED]>
