Regular Expressions 101

@regex101
Donate
Sponsor
Contact
Bug Reports & Feedback
Wiki
Whats new?

Save & Share

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

Flavor

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
(?<=Betrag:)(([\s])\d([\.,]\d)){2}
/
Positive Lookbehind
(?<=Betrag:)
Assert that the Regex below matches
Betrag: matches the characters Betrag: literally (case sensitive)
1st Capturing Group
(([\s])\d([\.,]\d)){2}
{2} matches the previous token exactly 2 times
A repeated capturing group will only capture the last iteration. Put a capturing group around the repeated group to capture all iterations or use a non-capturing group instead if you're not interested in the data
2nd Capturing Group
([\s])
Match a single character present in the list below
[\s]
* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
\s matches any whitespace character (equivalent to [\r\n\t\f\v ])
\d
matches a digit (equivalent to [0-9])
{1,8} matches the previous token between 1 and 8 times, as many times as possible, giving back as needed (greedy)
3rd Capturing Group
([\.,]\d)
Match a single character present in the list below
[\.,]
\. matches the character . literally (case sensitive)
, matches the character , literally (case sensitive)
\d
matches a digit (equivalent to [0-9])
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match

/
/

Test String