Skip to content

isValidRegExp

Checks if a string is a valid regular expression.

Import:

import { isValidRegExp } from 'obsidian-dev-utils/reg-exp';

Signature:

function isValidRegExp(str: string): boolean

Parameters:

ParameterTypeDescription
strstringThe string to check.

Returns: booleantrue if the string is a valid regular expression, false otherwise.