Spec-Zone.ru › Deno 2

@std/regexp

Overview

Functions for tasks related to regular expression (regexp), such as escaping text for interpolation into a regexp.

import { escape } from "@std/regexp/escape";
import { assertEquals, assertMatch, assertNotMatch } from "@std/assert";

const re = new RegExp(`^${escape(".")}$`, "u");

assertEquals("^\\.$", re.source);
assertMatch(".", re);
assertNotMatch("a", re);

Add to your project

›_
deno add jsr:@std/regexp

See all symbols in @std/regexp on

© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/runtime/reference/std/regexp

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API