Skip to content

getOsUnsafePathCharsRegExp

Returns a regexp matching characters that are not safe to use in file names/paths at the OS level.

Import:

import { getOsUnsafePathCharsRegExp } from 'obsidian-dev-utils/obsidian/validation';

Signature:

function getOsUnsafePathCharsRegExp(isWindows: boolean | undefined): RegExp

Parameters:

ParameterTypeDescription
isWindowsboolean | undefinedWhether to include Windows-specific restrictions. Defaults to Platform.isWin.

Returns: RegExp — A regexp matching characters that are not safe to use in file names/paths at the OS level.