FANDOM


Find prime numbers Edit

^1?$|^(11+?)\1+$

[1]

Match HTML (or XML) Tags Edit

This is the most common pattern cited, published by Friedl.

<(?:"[^"]*"|'[^']*'|[^'">])+>

This pattern has two flaws:

  • a white space character following the opening angle bracket is not actually a valid tag
  • this pattern can be totally catastrophic in the rare case of unbalanced quotation marks occurring inside a tag.

For this reason I prefer the following:

<\w(?:=\s*(?:"[^"]*"|'[^']*')?|[^>=])*>

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.