on 9/17/02 11:24 AM, [EMAIL PROTECTED] purportedly said: >> I think this will work pretty well: >> >> $src =~ s,(<img[^>]+)(?<!/)>,$1 />,ig; > > > yes of couse, lookbehind ;) > > hmm, would it be possible to actually do it without using lookbehind
Yes, if you don't mind re-writing tags that are already XHTML compliant:
$src =~ s|(<img.+?)(?: /)?>|$1 />|ig;
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
