diff --git a/assert/match.ts b/assert/match.ts index c96276371..03ae4df05 100644 --- a/assert/match.ts +++ b/assert/match.ts @@ -10,8 +10,8 @@ import { AssertionError } from "./assertion_error.ts"; * ```ts no-eval * import { assertMatch } from "@std/assert"; * - * assertMatch("Raptor", RegExp(/Raptor/)); // Doesn't throw - * assertMatch("Denosaurus", RegExp(/Raptor/)); // Throws + * assertMatch("Raptor", /Raptor/); // Doesn't throw + * assertMatch("Denosaurus", /Raptor/); // Throws * ``` * * @param actual The actual value to be matched. diff --git a/assert/not_match.ts b/assert/not_match.ts index a91134dde..6e9a30e25 100644 --- a/assert/not_match.ts +++ b/assert/not_match.ts @@ -10,8 +10,8 @@ import { AssertionError } from "./assertion_error.ts"; * ```ts no-eval * import { assertNotMatch } from "@std/assert"; * - * assertNotMatch("Denosaurus", RegExp(/Raptor/)); // Doesn't throw - * assertNotMatch("Raptor", RegExp(/Raptor/)); // Throws + * assertNotMatch("Denosaurus", /Raptor/); // Doesn't throw + * assertNotMatch("Raptor", /Raptor/); // Throws * ``` * * @param actual The actual value to match.