Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/regexp/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 531 B image not shown  

Quelle  named-capture-proxy.js

  Sprache: JAVA
 

var access_log = "";
const handler = {
    get: function(obj, prop) {
        access_log += prop + ",";
        return prop in obj ? obj[prop] : "<filled by proxy>";
    }
};

class ProxiedGroupRegExp extends RegExp {
    exec(s) {
        var result = super.exec(s);
        if (result) {
            result.groups = new Proxy(result.groups, handler);
        }
        return result;
    }
}

let re = new ProxiedGroupRegExp("(?<x>.)");
assertEq("a".replace(re, "$<x> $<y>"), "a <filled by proxy>");
assertEq(access_log, "x,y,")

Messung V0.5 in Prozent
C=82 H=94 G=88

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.