/// @module std::core::regex
/// Regular Expression Matching and Replacement
///
/// Full regular expression support including matching, replacement, and splitting.
///
/// # Example
///
/// ```shape
/// use std::core::regex
///
/// let matched = regex.is_match("hello world", "\\bworld\\b")
/// let result = regex.find("abc 123 def", "(\\d+)")
/// let parts = regex.split("one,two,three", ",")
/// ```
/// Test whether the pattern matches anywhere in the text.
///
/// # Arguments
///
/// * `text` - Text to search
/// * `pattern` - Regular expression pattern
///
/// # Returns
///
/// `true` if the pattern matches.
pub builtin fn is_match(text: string, pattern: string) -> bool;
/// Find the first match of the pattern, returning a match object or none.
///
/// The match object contains `text`, `start`, `end`, and `groups` fields.
/// This is an alias-safe name for `match` (which is a Shape keyword).
///
/// # Arguments
///
/// * `text` - Text to search
/// * `pattern` - Regular expression pattern
///
/// # Returns
///
/// Match object with text/start/end/groups, or none if no match.
pub builtin fn find(text: string, pattern: string) -> _?;
/// Find all non-overlapping matches of the pattern.
///
/// # Arguments
///
/// * `text` - Text to search
/// * `pattern` - Regular expression pattern
///
/// # Returns
///
/// Array of match objects with text/start/end/groups fields.
pub builtin fn match_all(text: string, pattern: string) -> Array<_>;
/// Replace the first match of the pattern with the replacement.
///
/// # Arguments
///
/// * `text` - Text to search
/// * `pattern` - Regular expression pattern
/// * `replacement` - Replacement string (supports $1, $2 for capture groups)
///
/// # Returns
///
/// String with the first match replaced.
pub builtin fn replace(text: string, pattern: string, replacement: string) -> string;
/// Replace all matches of the pattern with the replacement.
///
/// # Arguments
///
/// * `text` - Text to search
/// * `pattern` - Regular expression pattern
/// * `replacement` - Replacement string (supports $1, $2 for capture groups)
///
/// # Returns
///
/// String with all matches replaced.
pub builtin fn replace_all(text: string, pattern: string, replacement: string) -> string;
/// Split the text at each match of the pattern.
///
/// # Arguments
///
/// * `text` - Text to split
/// * `pattern` - Regular expression pattern to split on
///
/// # Returns
///
/// Array of substrings between matches.
pub builtin fn split(text: string, pattern: string) -> Array<string>;