src/cpython/re

Procs

proc split(pattern, str: string; maxsplit = 0; flags = 0): seq[string] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc findall(pattern, str: string; flags = 0): seq[string] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc sub(pattern, repl, str: string; count = 0; flags = 0): string {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc subn(pattern, replacement: string; count = 0; flags = 0): tuple[
    new_string: string, number_of_subs_made: int] {.
    ...raises: [Exception, ValueError, OSError, IOError, EOFError, KeyError],
    tags: [RootEffect].}
proc escape(pattern: string): string {....raises: [Exception, ValueError, OSError,
    IOError, EOFError, KeyError], tags: [RootEffect].}
proc purge() {....raises: [Exception, ValueError, OSError, IOError, EOFError,
                        KeyError], tags: [RootEffect].}