Skip to main content

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

at
  • Trim leading and trailing spaces before comparison.
  • Collapse repeated spaces only when the endbusiness ofvalue does not require exact formatting.
  • Keep the RegExporiginal means:captured global,value iein matchoutput when troubleshooting.
  • Avoid normalizing away meaningful spaces in codes, names, or formatted identifiers.

Validation workflow

  1. Capture the source text.
  2. Normalize the whitespace according to the validation need.
  3. Compare the normalized value to expected data.
  4. Record both original and replacenormalized allvalues occurrences.when diagnosing

    failures.

    Last updated: JuneSeptember 26,20, 20232026

    If you have any feedback on this topic, please contact us at documentation@appvance.ai