View Single Post
Old 11-16-2017, 02:43 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,173
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by mikapanja View Post
Interesting question from another forum.

Is there a Python regex to match multiple spaces between the opening and closing HTML tags,
disregarding the leading and trailing whitespaces and the fact that browsers collapse whitespace on render?

For instance, in:
Code:
<p><i>blah</i> §111   </p>
how does one capture the three spaces after 111?
Code:
\s{3,}</p>  ;3 or more before a P
\s also matches newlines, so the requirement for the closing p tag
theducks is offline   Reply With Quote