🌐
GitHub
github.com › networknt › json-schema-validator › blob › master › doc › ecma-262.md
json-schema-validator/doc/ecma-262.md at master · networknt/json-schema-validator
The Joni implementation is configured ... the ECMA-262 regular expression dialect. However this dialect isn't directly maintained by its maintainers as it doesn't come from its upstream Oniguruma. The current implementation has known issues matching inputs with newlines and not respecting ^ and $ anchors. The JDK implementation is the default and uses java.util.regex with the find() ...
Author   networknt
🌐
Hackolade
hackolade.com › help › Regularexpression.html
Regular expression
These regular expressions should be valid according to the ECMA 262 regular expression dialect. Regex value should start with the “^” and end with the “$” anchors to satisfy the internal Hackolade validation.
🌐
Ecma-international
262.ecma-international.org › 5.1
ECMAScript Language Specification - ECMA-262 Edition 5.1
A RegExp grammar for ECMAScript is given in 15.10. This grammar also has as its terminal symbols the characters as defined by SourceCharacter.
🌐
Regexforge
regexforge.com › docs › ecma-262-mode
ECMA-262 Regex Validation Rules in Regex Forge – Regex Forge
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.
🌐
OpenAPI
spec.openapis.org › registry › format › regex
Regex
The regex format is a regular expression as defined in ECMA-262.
🌐
Phrogz
objjob.phrogz.net › js › object › 316
RegExp in ECMAScript 262 :: ObjJob
var foo = /pattern/flags; //regexp literal var foo = new RegExp( patternAsString , flags ); //constructing from a string and flags var foo = new RegExp( existingRegExp ); //duplicating the existing regular expression
🌐
cppreference.com
en.cppreference.com › cpp › regex › ecmascript
Modified ECMAScript regular expression grammar - cppreference.com
August 18, 2024 - This page describes the regular expression grammar that is used when std::basic_regex is constructed with syntax_option_type set to ECMAScript (the default). See syntax_option_type for the other supported regular expression grammars. The ECMAScript 3 regular expression grammar in C++ is ECMA-262 ...
🌐
JSON Schema
json-schema.org › understanding-json-schema › reference › regular_expressions
JSON Schema - Regular Expressions
The pattern and patternProperties keywords use regular expressions to express constraints. The regular expression syntax used is from JavaScript (ECMA 262, specifically).
🌐
GitHub
github.com › raku-community-modules › ECMA262Regex
GitHub - raku-community-modules/ECMA262Regex: ECMA262Regex validation, parsing, and compilation · GitHub
use ECMA262Regex; say ECMA262Regex.validate('\e'); # False; say ECMA262Regex.validate('^fo+\n'); # True # Translate regex into a Raku one (string form) say ECMA262Regex.as-raku('^fo+\n'); # '^fo+\n' say ECMA262Regex.as-raku('[^ab-d]'); # '<-[ab..d]>' # Compile textual ECMA262 regex into a Raku Regex object my $regex = ECMA262Regex.compile('^fo+\n'); say "foo\n" ~~ $regex; # Success say " foo\n" ~~ $regex; # Failure
Author   raku-community-modules
Find elsewhere
🌐
GitHub
github.com › Julian › jsonschema › issues › 607
Support for ECMA 262 regex patterns · Issue #607 · python-jsonschema/jsonschema
October 1, 2019 - The value of [the pattern] keyword SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect. However sticking to a common subset of the syntax is recommended. I spent the weekend doing some research on the differences between Python and JS regex, and seeing ...
Author   python-jsonschema
🌐
Regular-Expressions.info
regular-expressions.info › javascript.html
JavaScript RegExp Object - Using Regular Expressions with Client Side Scripting
JavaScript’s regular expression flavor is part of the ECMA-262 standard for the language. This means your regular expressions should work exactly the same in all implementations of JavaScript. In the past there were many serious browser-specific issues. But modern browsers do a very good ...
Top answer
1 of 3
7

I don't know of any existing converter, but if your target is specifically ActionScript and not just any ECMA-262 implementation, the job could be easier than you expected. AS3 is powered by PCRE, same as PHP's preg_ functions, so it supports lookbehind, atomic groups and possessive quantifiers, same as Java. It also supports Java's dotall and extended modes in addition to JS's ignore-case and multiline. It supports the inline modifier syntax ((?imsx)) as well.

PCRE's Unicode support is better than Java's, but unfortunately, I don't think that's included in ActionScript. The Unicode functionality seems to be explicitly tied to the character encoding, which is UTF-8 in PCRE; I believe ActionScript uses UTF-16 in accordance with ECMA-262. Anyway, its Unicode support seems to be minimal, same as JavaScript's.

2 of 3
2

Here is a breakdown:

java.util.regex                                  RegExp.prototype
Character class set operations
(?#…) comment patterns
Named capture
The /y (sticky) modifier
The /x (extended) modifier
\u10000+ Codepoints
Possessive quantifiers
Quotation
Exception Handling
Linebreak matcher

References

  • ECMAScript RegExp bugs
  • What the JavaScript RegExp API Got Wrong, & How to Fix It
  • Non-Participating Groups: A Cross-Browser Mess
  • ECMAScript 3 Regular Expressions are Defective by Design
  • XRegExp: An Extended JavaScript Regex Constructor
  • Regex Recursion (Matching Nested Constructs)
  • Remove Nested Patterns with One Line of JavaScript
  • Validate Phone Numbers: A Detailed Guide
  • java.util.regex.Matcher
  • java.util.regex.Pattern
🌐
GitHub
github.com › gjtorikian › ecma-re-validator
GitHub - gjtorikian/ecma-re-validator: Validate a regular expression against what ECMA-262 (JavaScript) can actually do.
Validate a regular expression against what ECMA-262 (JavaScript) can actually do. - gjtorikian/ecma-re-validator
Starred by 2 users
Forked by 5 users
Languages   Ruby 99.1% | Shell 0.9% | Ruby 99.1% | Shell 0.9%
🌐
GitHub
gist.github.com › ppo › 17bb97d14343d47efaf4
Validation Regex ECMA-262 5.1 (date and/or time with optional timezone) · GitHub
Validation Regex ECMA-262 5.1 (date and/or time with optional timezone) - regex-ecma-262-5_1.txt
🌐
Softmake
softmake.com.au › regularExpressionTester
Regular Expression Tester for EcmaScript (JavaScript)
September 23, 2019 - Perform EcmaScript (JavaScript) Regular Expression Testing.
🌐
GitHub
github.com › OAI › OpenAPI-Specification › issues › 1687
Unclear which edition of ECMA-262 is used as regex format · Issue #1687 · OAI/OpenAPI-Specification
September 14, 2018 - While issue #880 links to http://www.ecma-international.org/publications/standards/Ecma-262.htm (just as JSON Schema does, the OpenAPI Specification deeplinks to the 5.1 edition in https://github.c...
Author   OAI
🌐
Stack Overflow
stackoverflow.com › questions › 38822951 › ecma-262-regex-does-not-match-input-string-https-domain-herokuapp-com
heroku - ECMA 262 regex "^/" does not match input string "https://domain.herokuapp.com" - Stack Overflow
{ schemaValidationMessages: [{ level: "error", domain: "validation", keyword: "pattern", message: "ECMA 262 regex "^/" does not match input string "https://domain.herokuapp.com "", schema: { loadingURI: "#", pointer: "/properties/basePath" }, instance: { pointer: "/basePath" } }] }