Normalize Extra Spaces in Scenario Editor Values
Normalize Extra Spaces in Scenario Editor Values
Text1.replace(/Normalize {1,}/g,"spacing ")when application text contains inconsistent whitespace that would otherwise make validations fragile.
The
Recommended gguidance
- Trim leading and trailing spaces before comparison.
- Collapse repeated spaces only when the
endbusinessofvalue does not require exact formatting. - Keep the
RegExporiginalmeans:capturedglobal,valueieinmatchoutput when troubleshooting. - Avoid normalizing away meaningful spaces in codes, names, or formatted identifiers.
Validation workflow
- Capture the source text.
- Normalize the whitespace according to the validation need.
- Compare the normalized value to expected data.
- Record both original and
replacenormalizedallvaluesoccurrences.whendiagnosing
failures.Last updated:
JuneSeptember26,20,20232026If you have any feedback on this topic, please contact us atdocumentation@appvance.ai