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
/
\<span\sclass\=\"js_value\stab-weather__value_l\"\>\s*+([+-]\d++)\s*+\<span\sclass\=\"tab-weather__value_m\"\>\s*+([.,]\d++)(?:\s*+\<\/span\>){2}
/
gm
\< matches the character < with index 6010 (3C16 or 748) literally (case sensitive)
span
matches the characters span literally (case sensitive)
\s matches any whitespace character (equivalent to [\r\n\t\f\v ])
class
matches the characters class literally (case sensitive)
\= matches the character = with index 6110 (3D16 or 758) literally (case sensitive)
\" matches the character " with index 3410 (2216 or 428) literally (case sensitive)
js_value
matches the characters js_value literally (case sensitive)
\s matches any whitespace character (equivalent to [\r\n\t\f\v ])
tab-weather__value_l
matches the characters tab-weather__value_l literally (case sensitive)
\" matches the character " with index 3410 (2216 or 428) literally (case sensitive)
\> matches the character > with index 6210 (3E16 or 768) literally (case sensitive)
\s
matches any whitespace character (equivalent to [\r\n\t\f\v ])
*+ matches the previous token between zero and unlimited times, as many times as possible, without giving back (possessive)
1st Capturing Group
([+-]\d++)
Match a single character present in the list below
[+-]
+-
matches a single character in the list +- (case sensitive)
\d
matches a digit (equivalent to [0-9])
++ matches the previous token between one and unlimited times, as many times as possible, without giving back (possessive)
\s
matches any whitespace character (equivalent to [\r\n\t\f\v ])
*+ matches the previous token between zero and unlimited times, as many times as possible, without giving back (possessive)
\< matches the character < with index 6010 (3C16 or 748) literally (case sensitive)
span
matches the characters span literally (case sensitive)
\s matches any whitespace character (equivalent to [\r\n\t\f\v ])
class
matches the characters class literally (case sensitive)
\= matches the character = with index 6110 (3D16 or 758) literally (case sensitive)
\" matches the character " with index 3410 (2216 or 428) literally (case sensitive)
tab-weather__value_m
matches the characters tab-weather__value_m literally (case sensitive)
\" matches the character " with index 3410 (2216 or 428) literally (case sensitive)
\> matches the character > with index 6210 (3E16 or 768) literally (case sensitive)
\s
matches any whitespace character (equivalent to [\r\n\t\f\v ])
*+ matches the previous token between zero and unlimited times, as many times as possible, without giving back (possessive)
2nd Capturing Group
([.,]\d++)
Non-capturing group
(?:\s*+\<\/span\>){2}
Global pattern flags
g modifier: global. All matches (don't return after first match)
m modifier: multi line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string)
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match

/
/
gm

Test String

Substitution

Processing...