ECMA-262 Mode in Regex Forge

Introduction

Regular expressions differ between programming languages and engines, with ECMA-262 (JavaScript regex) having specific limitations compared to PCRE, .NET, or Python.

To help developers write ECMA-262-compliant regex patterns, Regex Forge includes a built-in validation mode called ECMA-262 Mode. When enabled, this mode detects unsupported syntax and displays a warning in the status bar.

This document outlines all the unsupported regex features in ECMA-262 that Regex Forge validates.


Unsupported Features in ECMA-262

1. Unsupported Escape Sequences

2. Unsupported Special Escape Characters

3. Unsupported Word Boundaries

4. Invalid Character Ranges

5. Unsupported String Anchors

6. Unsupported Forward References

7. Unsupported Mode Modifiers

8. Unsupported Atomic Groups

9. Unsupported Possessive Quantifiers

10. Unsupported Lookbehind Assertions

11. Unsupported Start of Match Anchor

12. Unsupported Conditional Expressions

13. Unsupported Inline Comments

14. Unsupported Unicode Features

15. Unsupported Named Capturing Groups & Backreferences

16. Unsupported XML Name Character Classes

17. Unsupported Character Class Subtraction

18. Unsupported POSIX Features


Credits

Information about unsupported ECMA-262 features was sourced from this GitHub Gist by CMCDragonkai.

Conclusion

ECMA-262 Mode in Regex Forge ensures that regex patterns are fully compliant with JavaScript’s regex engine. By detecting unsupported syntax early, it prevents unexpected errors and inconsistencies when running regex patterns in JavaScript environments.

For the best experience, enable ECMA-262 Mode while working with JavaScript-based regex patterns in Regex Forge.