Note that there are some explanatory texts on larger screens.

plurals
  1. PORegular expression to convert ul to textformat and back, with a different attribute value for first tag (VB.NET)
    primarykey
    data
    text
    <p>This is a related to a previous question I have asked here, see the link below for a brief description as to why I am trying to do this.</p> <p><a href="https://stackoverflow.com/questions/2523393/regular-expression-from-font-to-span-size-and-colour-and-back-vb-net">Regular expression from font to span (size and colour) and back (VB.NET)</a></p> <p>Basically I need a regex replace function (or if this can be done in pure VB then that's fine) to convert all ul tags in a string to textindent tags, with a different attribute value for the first textindent tag. </p> <p>For example:</p> <pre><code>&lt;ul&gt; &lt;li&gt;This is some text&lt;/li&gt; &lt;li&gt;This is some more text&lt;/li&gt; &lt;li&gt; &lt;ul&gt; &lt;li&gt;This is some indented text&lt;/li&gt; &lt;li&gt;This is some more text&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;More text!&lt;/li&gt; &lt;li&gt; &lt;ul&gt; &lt;li&gt;This is some indented text&lt;/li&gt; &lt;li&gt;This is some more text&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;More text!&lt;/li&gt; &lt;/ul&gt; &lt;ul&gt; &lt;li&gt;Another list item&lt;/li&gt; &lt;li&gt; &lt;ul&gt; &lt;li&gt;Another nested list item&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Will become:</p> <pre><code>&lt;textformat indent="0"&gt; &lt;li&gt;This is some text&lt;/li&gt; &lt;li&gt;This is some more text&lt;/li&gt; &lt;li&gt; &lt;textformat indent="20"&gt; &lt;li&gt;This is some indented text&lt;/li&gt; &lt;li&gt;This is some more text&lt;/li&gt; &lt;/textformat&gt; &lt;/li&gt; &lt;li&gt;More text!&lt;/li&gt; &lt;li&gt; &lt;textformat indent="20"&gt; &lt;li&gt;This is some indented text&lt;/li&gt; &lt;li&gt;This is some more text&lt;/li&gt; &lt;/textformat&gt; &lt;/li&gt; &lt;li&gt;More text!&lt;/li&gt; &lt;/textformat&gt; &lt;textformat indent="0"&gt; &lt;li&gt;Another list item&lt;/li&gt; &lt;li&gt; &lt;textformat indent="20"&gt; &lt;li&gt;Another nested list item&lt;/li&gt; &lt;/textformat&gt; &lt;/li&gt; &lt;/textformat&gt; </code></pre> <p>Basically I want the first ul tag to have no indenting, but all nested ul tags to have an indent of 20.</p> <p>I appreciate this is a strange request but hopefully that makes sense, please let me know if you have any questions.</p> <p>Thanks in advance.</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.
    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