"Stimp" <ren@xxxxxx> wrote in message
news:slrng99auc.nnj.ren@xxxxxx
> On Sat, 2 Aug 2008 Evertjan. <exjxw.hannivoort@xxxxxx> wrote:
>> Stimp wrote on 02 aug 2008 in microsoft.public.scripting.vbscript:
>>
>>> Hi all,
>>>
>>> given a string:
>>>
>>> " <img class='myclass' alt='my picture' src='image.jpg' /> "
>>>
>>> (where alt and src are changeable)
>>>
>>> how do I create the following string:
>>>
>>> " <div class='container'>
>>> <div class='inner'>
>>> <img class='myclass' alt='my picture' src='image.jpg' />
>>> <p>my picture</p>
>>> </div>
>>> </div> "
>>>
>>> (where the contents of <p></p> are the same as the image 'alt') ?
>>>
>>>
>>> I believe a regular expression would solve this but I'm not sure on the
>>> syntax.
>>>
>>> something like:
>>>
>>> regex.replace("<img class='myclass' alt='$1' src='$2' />","<div
>>> class='container'><div class='inner'><img class='myclass' alt='$1'
>>> src='$2' /><p>$1</p></div></div>")
>>>
>>>
>>> Any ideas? Thanks! >>
>>
>> Please do not multipost >
> as I mentioned in .javascript .. this is a post relevant to the groups I
> have posted to since many people don't read both groups.
>
> Answers in other groups will be placed here. Evertjan's comment is still valid. When you have a thread that has relevence
to a small number of groups, the best way to handle it is to CROSSPOST
rather than MULTIPOST. That way a reply in one group will be sent to all
groups without you having to, redundantly and manually copy from one group
to the other to try to keep them in synch.
FYI, the reason that many of us find multiposting frustrating is that we
often see one of the posts with no responses, and then spend a fair amount
of time supplying an answer - only to find out that was a waste of time
because someone already supplied the answer in another group.
/Al