On Tue, Feb 22, 2011 at 02:16:38PM -0800, frank_lapidus wrote: > I have the problem that in my web project there a many HTML-files (800!) > with image-links without the .png-suffix;-( > > Here is one example: <img align="absmiddle" alt="" border="0" hspace="5" * > src="../formulaPNG/70559256_1135261b2da_-7dc6"* title="" vspace="5"/> > > Thus I need to add the png-suffix at the end of every link and I need a > wildcard for "70559256_1135261b2da_-7dc6"! > > Any idea how I can achieve that?
Here's another way to do it. I'm assuming that you want to add .png to any filename that doesn't already have a suffix. I'm also assuming that all the img tags use double-quotes around the value for the src attribute, because it makes the regex simpler... Find: (<img\s[^>]*src="(?:[^"]+/)?[^"/.]+)" Replace: \1.png" HTH, Ronald -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
