Note that there are some explanatory texts on larger screens.

plurals
  1. PORegex \n doesn't work
    text
    copied!<p>I'm trying to parse text out of two lines of HTML.</p> <pre><code>Dim PattStats As New Regex("class=""head""&gt;(.+?)&lt;/td&gt;"+ "\n&lt;td&gt;(.+?)&lt;/td&gt;") Dim makor As MatchCollection = PattStats.Matches(page) For Each MatchMak As Match In makor ListView3.Items.Add(MatchMak.Groups(1).Value) Next </code></pre> <p>I added the <code>\n</code> to match the next line, but for some reason it won't work. Here's the source I'm running the regex against.</p> <pre><code>&lt;table class="table table-striped table-bordered table-condensed"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td class="head"&gt;Health Points:&lt;/td&gt; &lt;td&gt;445 (+85 / per level)&lt;/td&gt; &lt;td class="head"&gt;Health Regen:&lt;/td&gt; &lt;td&gt;7.25&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="head"&gt;Energy:&lt;/td&gt; &lt;td&gt;200&lt;/td&gt; &lt;td class="head"&gt;Energy Regen:&lt;/td&gt; &lt;td&gt;50&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="head"&gt;Damage:&lt;/td&gt; &lt;td&gt;53 (+3.2 / per level)&lt;/td&gt; &lt;td class="head"&gt;Attack Speed:&lt;/td&gt; &lt;td&gt;0.694 (+3.1 / per level)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="head"&gt;Attack Range:&lt;/td&gt; &lt;td&gt;125&lt;/td&gt; &lt;td class="head"&gt;Movement Speed:&lt;/td&gt; &lt;td&gt;325&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="head"&gt;Armor:&lt;/td&gt; &lt;td&gt;16.5 (+3.5 / per level)&lt;/td&gt; &lt;td class="head"&gt;Magic Resistance:&lt;/td&gt; &lt;td&gt;30 (+1.25 / per level)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="head"&gt;Influence Points (IP):&lt;/td&gt; &lt;td&gt;3150&lt;/td&gt; &lt;td class="head"&gt;Riot Points (RP):&lt;/td&gt; &lt;td&gt;975&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; </code></pre> <p>I'd like to match the first <code>&lt;td class...&gt;</code> and the following line in one regex :/ </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