Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I search for words in between html tags in PHP?
    text
    copied!<p>How can I search for words in between html tags? Say I have the given strings:</p> <pre><code>&lt;span style="font-weight: bold;"&gt; &lt;font size="4"&gt;Bearings&lt;br /&gt;&lt;br /&gt;&lt;/font&gt; &lt;/span&gt; &lt;span style="font-weight: bold;"&gt; &lt;font size="4"&gt; Scale Drawing &amp;amp; Error in Measurement&lt;br /&gt;&lt;br /&gt; &lt;/font&gt; &lt;/span&gt; &lt;p align="left" class="MsoNormal" style="text-align: left;"&gt; &lt;b/&gt; &lt;span lang="EN-GB"&gt; &lt;font size="4" class="Apple-style-span"&gt; Solving Equations inc. Quadratic Formula &lt;/font&gt; &lt;/span&gt; &lt;/b&gt; &lt;/p&gt; </code></pre> <p>How can I search for the titles: Bearings, Scale Draw &amp;ampl Error in Measurement and Solving Equations inc. Quadratic Formula? Also bearing in mind that the amount of html tags before and after the titles are dynamic meaning they could be anything and there could be any amount. Also, the titles themselves are dynamic, I don't know what they actually are. I'm searching for them. However, I know that they are at the start of the string, which means I can do something like search for the double quotations and then the right angled bracket "> and then the wildcard * and then the closing bracket and forward slash <code>&lt;/</code></p> <pre><code>"&gt; * &lt;/ </code></pre> <p>Note that I have no idea about regex and I'm just stating that I could do a search on something like that since the VERY FIRST occurrence of <code>&lt;/</code> implies the title is right before that. </p>
 

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