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 '@mnaoumov/obsidian-lib/validation';

Signature:

function getOsUnsafePathCharsRegExp(isWindows: boolean | undefined): RegExp

Parameters:

Parameter Type Description
isWindows boolean | undefined Whether 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.