import { RegexType } from '../common'; /** * Check if a string contains at least one occurrence of a regular expression pattern. * @param text The string to search for the regular expression pattern. * @param pattern The regular expression pattern. * @param flags The flags to use when evaluating the regular expression. Supported flags are: 'i' - ignore case, 'm' - multiline match. * * @returns True if the regex evaluation results in at least one match. False otherwise. * * @throws `InputRequiredError` "" is a required input but was not provided */ export declare function contains(text: string, pattern: string, flags?: string): Promise; /** * Find occurrences of a regular expression pattern in a string and returns an array of the matched strings. * @param text The string to match against the regular expression. * @param pattern The regular expression pattern. * @param flags The flags to use when evaluating the regular expression. Supported flags are: 'i' - ignore case, 'm' - multiline match. * @param type The type indicates whether it's a regex match or a regex group. Supported types: 'match','group'. * @param limit The maximum number of matches to return. * * @returns An array containing all strings that matched against the regex up to the match limit, if specified. * * @throws `InputRequiredError` "" is a required input but was not provided */ export declare function matches(text: string, pattern: string, flags?: string, type?: RegexType, limit?: number): Promise; /** * Find the first occurrence of a regular expression pattern in a string and returns the matched string. * @param text The string to match against the regular expression. * @param pattern The regular expression pattern. * @param flags The flags to use when evaluating the regular expression. Supported flags are: 'i' - ignore case, 'm' - multiline match. * @param type The type indicates whether it's a regex match or a regex group. Supported types: 'match','group'. * * @returns An output string which is the first occurrence of a regular expression pattern in a string. * * @throws `InputRequiredError` "" is a required input but was not provided */ export declare function matchOne(text: string, pattern: string, flags?: string, type?: RegexType): Promise; /** * Find occurrences of a regular expression pattern in a string and replaces each occurrence with another string. * @param text The string to search for the regular expression pattern. * @param pattern The regular expression pattern. * @param flags The flags to use when evaluating the regular expression. Supported flags are: 'i' - ignore case, 'm' - multiline match. * @param replacement The value with which to replace each matching occurrence of the regular expression pattern. * @param limit The maximum number of matches to replace. * * @returns The input string with each matching occurrence of the regular expression pattern replaced with the replacement string up to the replacement limit, if specified. * * @throws `InputRequiredError` "" is a required input but was not provided */ export declare function replace(text: string, pattern: string, flags?: string, replacement?: string, limit?: number): Promise; /** * Find occurrences of a regular expression pattern in a string and splits the string into an array of substrings for each occurrence. * @param text The string to search for the regular expression pattern. * @param pattern The regular expression pattern. * @param flags The flags to use when evaluating the regular expression. Supported flags are: 'i' - ignore case, 'm' - multiline match. * @param limit The maximum number of matches on which to split the string. * * @returns An array of strings containing the segments of the input string that were split on each matching occurrence of the regular expression pattern up to the split limit, if specified * * @throws `InputRequiredError` "" is a required input but was not provided */ export declare function split(text: string, pattern: string, flags?: string, limit?: number): Promise;