oneOf
Combine multiple regexes into one alternation, handling flags.
Import:
import { oneOf } from 'obsidian-dev-utils/reg-exp';Signature:
function oneOf(regExps: RegExp[], strategy: RegExpMergeFlagsConflictStrategy): RegExpParameters:
| Parameter | Type | Description |
|---|---|---|
regExps | RegExp[] | The regexes to combine. |
strategy | RegExpMergeFlagsConflictStrategy | The strategy to use when merging flags (default: RegExpMergeFlagsConflictStrategy.Throw). |
Returns: RegExp — The combined regex.