468,287 Members | 1,977 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,287 developers. It's quick & easy.

BBEdit Lite GREP Problem


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://www.theherbsplace.com/\1"">

This works fine if the link has no http://mydomain.com/ in front of it

So, I was wondering how I could incorporate a test for

1. not changing the link if the http://mydomain.com/ prefix is present
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

What I found doing the research was the ?! code but my GREP engine
converts it to ?+* and says it is not valid.



Apr 18 '07 #1
0 1428

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by sf | last post: by
2 posts views Thread by John E. Jardine | last post: by
1 post views Thread by Al Belden | last post: by
reply views Thread by William E. Tcherust | last post: by
2 posts views Thread by Rich Sagall | last post: by
3 posts views Thread by David Isaac | last post: by
13 posts views Thread by Anton Slesarev | last post: by
47 posts views Thread by Henning_Thornblad | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.