Regex tester
Pattern
Input
foo text 111, 222 and not bar something 333 but foo 444 and better 555

foo 123 456 bar  123
Options
Replacement
Click the context tab to see replacements.
3 matches found in about 6 milliseconds.
IndexPositionMatched String${A}
00foo text 111, 222 and not 222
2 captures
  1. 111
  2. 222
148foo 444 and better 555 555
2 captures
  1. 444
  2. 555
274foo 123 456 456
2 captures
  1. 123
  2. 456
foo text 111, 222 and not bar something 333 but foo 444 and better 555
​
​foo 123 456 bar  123
  1. empty string
  2. 222
  3. bar something 333 but
  4. 555
  5. whitespace
  6. 456
  7. bar 123