Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(stepfunctions): regex in DistributedMap label is incorrectly esca…
…ping characters (#29765) Regex is incorrect. Switching to basic regex. Fixing regex to properly escape special characters ### Reason for this change Regex was incorrectly escaping the `]` character, and as such was falsely returning `true`. It also seemed to be interpreting the `\` characters incorrectly, so I switched to a regex literal in line to fix that. ### Description of changes Switch from `RegExp` object to inline regex. Fix regex to correctly escape `]` character. ### Description of how you validated changes Running in Node CLI, such as: ```node > /[\s\?\*\<\>\{\}\\[\]\:\;\,\|\^\~\$\#\%\&\`\"]|[\u0000-\u001f]|[\u007f-\u009f]/gi.test(' ') true ``` Running in Chrome Dev Tools console, such as: ```js new RegExp("/[\s\?\*\<\>\{\}\\[\]\:\;\,\|\^\~\$\#\%\&\`\"]|[\u0000-\u001f]|[\u007f-\u009f]/gi").test(' ') false ``` no ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information