[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



You could use this:

s/src="\([^"]*\)"/\Lsrc="\1"\E/g

The \L in the replacement pattern means "convert everything to lowercase
until you see a '\E'".  This works in sed and vi.  If you're using perl,
omit the backslashes in front of the parentheses and change \1 to $1:

s/src="([^"]*)"/\Lsrc="$1"\E/g

Note that I changed your match pattern slightly.  The pattern you had,
/src=\".*\"/, is likely to have unintended side effects, because it will
do a greedy match.  For example, if your html has the following line:

<img src="../Foo.GIF"> Blah blah blah Verbage, etc. <img src="../BAR.Gif">

Then all the verbage between the two image tags would get lowercased as
well, which is probably not what you want.

HTH,
Jason
-- 
Jason Day                                       jasonday at
<a  rel="nofollow" href="http://jasonday.home.att.net";>http://jasonday.home.att.net</a>                    worldnet dot att dot net
 
&quot;Of course I'm paranoid, everyone is trying to kill me.&quot;
    -- Weyoun-6, Star Trek: Deep Space 9


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00328" href="msg00328.html">[ale] regexp help</a></strong>
<ul><li><em>From:</em> ale at spinnerdog.com (David Hamm)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00325" href="msg00325.html">[ale] regexp help</a></strong>
<ul><li><em>From:</em> ale at spinnerdog.com (David Hamm)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00325.html">[ale] regexp help</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00327.html">[ale] regexp help</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00325.html">[ale] regexp help</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00328.html">[ale] regexp help</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00326"><strong>Date</strong></a></li>
<li><a href="threads.html#00326"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>