Optionally
A regex component that matches zero or one occurrences of its underlying component.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
struct Optionally<Output>
A regex component that matches zero or one occurrences of its underlying component.
struct Optionally<Output>
import RegexBuilder
protocol RegexComponent<RegexOutput>
A type that represents a regular expression.
init(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == Substring
Creates a regex component that matches the given component zero or one times.
init(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == Substring
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?, C10?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10>(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?, C10?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5, C6, C7, C8, C9>(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5, C6, C7, C8, C9>(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?, C9?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5, C6, C7, C8>(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5, C6, C7, C8>(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?, C8?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5, C6, C7>(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5, C6, C7>(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?, C2?, C3?, C4?, C5?, C6?, C7?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5, C6>(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, C1?, C2?, C3?, C4?, C5?, C6?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5, C6>(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?, C2?, C3?, C4?, C5?, C6?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5>(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, C1?, C2?, C3?, C4?, C5?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4, C5>(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?, C2?, C3?, C4?, C5?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4>(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, C1?, C2?, C3?, C4?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3, C4>(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?, C2?, C3?, C4?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3>(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, C1?, C2?, C3?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2, C3>(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?, C2?, C3?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2>(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, C1?, C2?)
Creates a regex component that matches the given component zero or one times.
init<W, C1, C2>(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?, C2?)
Creates a regex component that matches the given component zero or one times.
init<W, C1>(_ behavior: RegexRepetitionBehavior? = nil, @RegexComponentBuilder _ componentBuilder: () -> some RegexComponent) where Output == (Substring, C1?)
Creates a regex component that matches the given component zero or one times.
init<W, C1>(_ component: some RegexComponent, _ behavior: RegexRepetitionBehavior? = nil) where Output == (Substring, C1?)
Creates a regex component that matches the given component zero or one times.
var regex: Regex<Output>