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
/
1-0:1\.8\.1\x28([0-9]+\.[0-9]+)kWh\)
/
1-0:1
matches the characters 1-0:1 literally (case sensitive)
\. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
8 matches the character 8 with index 5610 (3816 or 708) literally (case sensitive)
\. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
1 matches the character 1 with index 4910 (3116 or 618) literally (case sensitive)
\x28 matches the character ( with index 2816 (4010 or 508) literally (case sensitive)
1st Capturing Group
([0-9]+\.[0-9]+)
Match a single character present in the list below
[0-9]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case sensitive)
\. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
Match a single character present in the list below
[0-9]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case sensitive)
kWh
matches the characters kWh literally (case sensitive)
\) matches the character ) with index 4110 (2916 or 518) literally (case sensitive)
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match

/
/

Test String