Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Only the 4th test case is working.</p> <p>the first <code>m~href="(.*?)"~s</code> This will match the first href within your string and capture what is between the quotes so: <code>/hoh/hoh/hoh/hoh/hoh</code></p> <p>The second : <code>m~href="(.*?)".*&gt;lol~s</code> This will match the first href within your string and capture what is between the quotes, then match any any number of any character until it finds <code>&gt;lol</code> so: <code>/hoh/hoh/hoh/hoh/hoh</code></p> <p>Try capturing the <code>.*</code> with <code>m~href="(.*?)"(.*)&gt;lol~s</code> </p> <pre><code>$1 contains : /hoh/hoh/hoh/hoh/hoh $2 contains : class="hoh"&gt;hoh&lt;/a&gt; &lt;a href="/foo/foo/foo/foo/foo" class="foo"&gt;foo &lt;/a&gt; &lt;a href="/bar/bar/bar/bar/bar" class="bar"&gt;bar&lt;/a&gt; &lt;a href="/lol/lol/lol/lol/lol" class="lol" </code></pre> <p>the third : <code>m~href="(.*?)".*?&gt;lol~s</code> Same result as the previous test case.</p> <p>The fourth : <code>m~.*href="(.*?)".*?&gt;lol~s</code> This will match any number of any character then <code>href="</code> then capture any number of any character non-greedy until the quote, then match any any number of any character until it finds <code>&gt;lol</code> so: <code>/lol/lol/lol/lol/lol</code></p> <p>Try capturing all the <code>.*</code> with <code>m~(.*)href="(.*?)"(.*?)&gt;lol~s</code></p> <pre><code>$1 contains : &lt;a href="/hoh/hoh/hoh/hoh/hoh" class="hoh"&gt;hoh&lt;/a&gt; &lt;a href="/foo/foo/foo/foo/foo" class="foo"&gt;foo &lt;/a&gt; &lt;a href="/bar/bar/bar/bar/bar" class="bar"&gt;bar&lt;/a&gt; &lt;a $2 contains : /lol/lol/lol/lol/lol $3 contains : class="lol" </code></pre> <p>Have a look at <a href="http://chris.photobooks.com/regex/default.htm" rel="nofollow">this site</a> it explains what your regexes are doing.</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.
    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