A practical walkthrough of using JavaScript regular expressions to parse plus-minus (±) range expressions entered by engineers in a manufacturing web UI. Because humans write tolerances inconsistently (e.g., '30mm +- 0.5', '30+/-0.5', '30 ± .5'), a flexible regex is built by composing a number pattern and a plus-minus separator

4m read timeFrom bennadel.com
Post cover image
Table of contents
You Might Also Enjoy Some of My Other PostsReader Comments

Sort: