- Preparing search index...
- The search index is not available
Documentation
Function replaceWithRegex
- replaceWithRegex<T>(text: string, regex: RegExp, replacer: ((params: {
groups: string[];
index: number;
keyPrefix: string;
match: string;
matchIndex: undefined | number;
}) => T), keyPrefix: string): (string | T)[]
-
Parameters
-
text: string
-
regex: RegExp
-
replacer: ((params: {
groups: string[];
index: number;
keyPrefix: string;
match: string;
matchIndex: undefined | number;
}) => T)
-
- (params: {
groups: string[];
index: number;
keyPrefix: string;
match: string;
matchIndex: undefined | number;
}): T
-
Parameters
-
params: {
groups: string[];
index: number;
keyPrefix: string;
match: string;
matchIndex: undefined | number;
}
-
groups: string[]
-
index: number
-
keyPrefix: string
-
match: string
-
matchIndex: undefined | number
Returns T
-
keyPrefix: string
Returns (string | T)[]