extractNumbers method
Extracts all numbers from the string.
Example:
'Price: \$123.45'.extractNumbers(); // '12345'
Implementation
String extractNumbers() => replaceAll(RegExp(r'[^\d]'), '');
Extracts all numbers from the string.
Example:
'Price: \$123.45'.extractNumbers(); // '12345'
String extractNumbers() => replaceAll(RegExp(r'[^\d]'), '');