Skip to content
sanya_fritz edited this page Mar 23, 2024 · 1 revision

Documentation for the Pgex module

This module provides functions for working with regular expressions.

Functions

findAllMatches(const ponystring& text, const ponystring& pattern)

This function finds all matches in the string text according to the specified regular expression pattern.

  • Parameters:
    • text: The string in which to find matches.
    • pattern: The regular expression to search for.
  • Returns: A list of strings (ponystring) containing all the found matches.

replaceAllMatches(const ponystring& text, const ponystring& pattern, const ponystring& replacement)

This function replaces all matches in the string text according to the specified regular expression pattern with the specified replacement string replacement.

  • Parameters:
    • text: The string in which to perform replacements.
    • pattern: The regular expression to search for matches.
    • replacement: The string to replace the found matches with.
  • Returns: A string (ponystring) containing the result of replacing all matches.

Clone this wiki locally