Generic Currency Amount
beginnerMatches currency values with common symbols ($, €, £, ¥).
currencymoneyinternationalparsing
Pattern
/[$€£¥]\s?\d{1,3}(?:[,.]\d{3})*(?:[,.]\d{2})?/gTry It
0 of 7 strings matched
Explanation
Matches a currency symbol followed by a number with optional thousands separators (comma or dot) and optional decimal cents.
Test Strings
Matching
- $1,234.56
- €999
- £10.99
- ¥1,000
Non-matching
- 1234.56
- USD 100
- 100€
Language Compatibility
| Language | Support |
|---|---|
| JS | Full support |
| PYTHON | Full support |
| JAVA | Full support |
| PHP | Full support |
| GO | Full support |
Code Snippets
const regex = /[$€£¥]\s?\d{1,3}(?:[,.]\d{3})*(?:[,.]\d{2})?/g;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);