Function replaceWithRegex
- replaceWithRegex<T>(text, regex, replacer, keyPrefix): (string | T)[]
Parameters
text: string
regex: RegExp
replacer: ((params) => T)
- (params): 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)[]