How to extract Only Number and "." from a string?
Extract
string.replace(/[^0-9.]/g, Numbers"") from/ astring.replace(/[^a-zA-Z0-9.]/g, String'')
in
UseLast updated: June 26, 2023
If you have any feedback on this patterntopic, whenplease acontact Scenarious Editorat test needs to capture numeric values from application text, such as prices, IDs, quantities, or decimal values.documentation@appvance.ai
Recommended guidance
Extract only the value required by the validation or downstream step.Preserve decimal points only when the business value requires them.Normalize currency symbols, commas, spaces, and labels before comparison.Store extracted values with clear names when they are reused later.
Validation workflow
Capture the source text from the page, response, or stored value.Apply the extraction rule to isolate the numeric value.Validate the extracted value against expected test data or business rules.Record the source text and extracted value when troubleshooting failures.
Last updated: September 20, 2026