mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Fix more than 9 regex groups
This commit is contained in:
		| @@ -118,7 +118,7 @@ function runRegexScript(regexScript, rawString, { characterOverride } = {}) { | ||||
|     newString = rawString.replace(findRegex, function(match) { | ||||
|         const args = [...arguments]; | ||||
|         const replaceString = regexScript.replaceString.replace(/{{match}}/gi, '$0'); | ||||
|         const replaceWithGroups = replaceString.replaceAll(/\$(\d)+/g, (_, num) => { | ||||
|         const replaceWithGroups = replaceString.replaceAll(/\$(\d+)/g, (_, num) => { | ||||
|             // Get a full match or a capture group | ||||
|             const match = args[Number(num)]; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user