Note that there are some explanatory texts on larger screens.

plurals
  1. POregex to wrap img tag with href containg the src
    primarykey
    data
    text
    <p>[Edited - Sorry Bart] I've looked at other answers but struggling to match this. I want to wrap an image tag where the src is the second attribute (after title) with a specific anchor tag that contains a link to the image found in the src from the image tag. </p> <p>Example of img tag in string. This has been entered via tinymce wysiwyg and always adds title then src.</p> <pre><code>&lt;img title="who_main_Layer_1.jpg" src="../../images/who_main_Layer_1.jpg" alt="who_main_Layer_1.jpg" width="380" height="268" /&gt; </code></pre> <p>I need to take all of these and wrap with the following href:</p> <pre><code>&lt;a href="event:images/expand/image.jpg"&gt;&lt;img src=”images/image.jpg” /&gt;&lt;/a&gt; </code></pre> <p>The image src points to the thumbnail and the (Flash AS3 Event) pops up the full size version. Both images named the same just different folders.</p> <p>Here is a full example of a string that would need the regex running against (Due to sensitive data I've substituted text for Lorem ipsum, but the layout is the same!):</p> <pre><code>&lt;p&gt;Lorem ipsum dolor sit amet&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Lorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLoremipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit amet&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;img title="who_main_Layer_1.jpg" src="../../images/who_main_Layer_1.jpg" alt="who_main_Layer_1.jpg" width="380" height="268" /&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Lorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit amet&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;img title="who_main_Layer_1.jpg" src="../../images/who_main_Layer_1.jpg" alt="who_main_Layer_1.jpg" width="380" height="268" /&gt;&lt;/p&gt;` </code></pre> <p>Many thanks in advance, Marc</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload