Regular Expressions 101

Save & Share

  • Save Regex
    ctrl+s
  • Update Regex
    ctrl+⇧+s

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
<textarea([^>]+)[>]([^<]+[^t]+[^e]+[^x]+[^t]+[^a]+[^r]+[^e]+[^a]+[^>]|.*)<\/textarea>
/
g
<textarea
matches the characters <textarea literally (case sensitive)
1st Capturing Group
([^>]+)
Match a single character not present in the list below
[^>]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
> matches the character > with index 6210 (3E16 or 768) literally (case sensitive)
Match a single character present in the list below
[>]
> matches the character > with index 6210 (3E16 or 768) literally (case sensitive)
2nd Capturing Group
([^<]+[^t]+[^e]+[^x]+[^t]+[^a]+[^r]+[^e]+[^a]+[^>]|.*)
1st Alternative
[^<]+[^t]+[^e]+[^x]+[^t]+[^a]+[^r]+[^e]+[^a]+[^>]
Match a single character not present in the list below
[^<]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
< matches the character < with index 6010 (3C16 or 748) literally (case sensitive)
Match a single character not present in the list below
[^t]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
t matches the character t with index 11610 (7416 or 1648) literally (case sensitive)
Match a single character not present in the list below
[^e]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
e matches the character e with index 10110 (6516 or 1458) literally (case sensitive)
Match a single character not present in the list below
[^x]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
x matches the character x with index 12010 (7816 or 1708) literally (case sensitive)
Match a single character not present in the list below
[^t]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
t matches the character t with index 11610 (7416 or 1648) literally (case sensitive)
Match a single character not present in the list below
[^a]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
a matches the character a with index 9710 (6116 or 1418) literally (case sensitive)
Match a single character not present in the list below
[^r]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
r matches the character r with index 11410 (7216 or 1628) literally (case sensitive)
Match a single character not present in the list below
[^e]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
e matches the character e with index 10110 (6516 or 1458) literally (case sensitive)
Match a single character not present in the list below
[^a]
Match a single character not present in the list below
[^>]
2nd Alternative
.*
.
matches any character (except for line terminators)
* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
< matches the character < with index 6010 (3C16 or 748) literally (case sensitive)
\/ matches the character / with index 4710 (2F16 or 578) literally (case sensitive)
textarea>
matches the characters textarea> literally (case sensitive)
Global pattern flags
g modifier: global. All matches (don't return after first match)
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match

/
/
g

Test String