zabylka's regex
My Preferred Prose Style
I like simple prose. Clean shit. I read a lot, and it's rare excessive flourish is good enough to outdo a confident word choice from the get-go imo. LLMs just take the worst examples of this and run. Make sure what you're removing isn't something you want!
Want to add a duplicate regex button to SillyTavern?
Click me here!!
1. Go to *\SillyTavern\public\scripts\extensions\regex*
2. Open index.js and locate the following block:
scriptHtml.find('.regex_bulk_checkbox').on('change', function () {
const checkboxes = $('#regex_container .regex_bulk_checkbox');
const allAreChecked = checkboxes.length === checkboxes.filter(':checked').length;
setToggleAllIcon(allAreChecked);
});
3. Paste the following code block right after it:
// Duplicate button :D I AM NOT OFFICIAL!!!
const duplicateBtn = $(`
`);
scriptHtml.find('.edit_existing_regex').parent().append(duplicateBtn);
duplicateBtn.on('click', async function () {
// Clone the script, assign new id and append " (Copy)" to the name
const newScript = { ...script, id: uuidv4(), scriptName: script.scriptName + ' (Copy)' };
await saveRegexScript(newScript, -1, isScoped);
toastr.success(t`Duplicated "${script.scriptName}"`);
});
4. Save the file and restart SillyTavern.
5. You should now see a duplicate button next to the delete button in the regex editor!
Want to change the default boxes checked in the RegEx extension?
1. Go to *\SillyTavern\public\scripts\extensions\regex*
2. Open index.js and locate the following block:
Expand
} else {
editorHtml
.find('input[name="only_format_display"]')
.prop('checked', true);
editorHtml
.find('input[name="run_on_edit"]')
.prop('checked', true);
editorHtml
.find('input[name="replace_position"][value="1"]')
.prop('checked', true);
}
3. Add these two lines below to add AI Output + Alter Outgoing Prompt to default checked, replace with
Expand
} else {
editorHtml
.find('input[name="only_format_display"]')
.prop('checked', true); // Alter Chat Display
editorHtml
.find('input[name="run_on_edit"]')
.prop('checked', true); // Run on Edit
editorHtml
.find('input[name="replace_position"][value="1"]')
.prop('checked', true); // User Input
editorHtml
.find('input[name="replace_position"][value="2"]')
.prop('checked', true); // AI Output
editorHtml
.find('input[name="only_format_prompt"]')
.prop('checked', true); // Alter Outgoing Prompt
}
Quick Little Essentials :)
Minimalism: Double Adjectives
/\b(aborted|anxious|appraising|awkward|beautifully illogical|broken|brutal|calm|charged|clean|clinical|clumsy|coppery|crystalline|deadly|deliberate|dense|desperate|detached|distant|dismissive|faint|fractured|fragile|flickering|gaping|gentle|genuine|gleaming|guttural|gutting|haunting|honest|horrifying|howling|immovable|imposing|jerky|low|melodic|mocking|new|patient|perfect|placid|plodding|pointless|primal|professional|pure|quick|quiet|ragged|resonant|rhythmic|selfless|shaking|sharp|shrill|silent|slow|sterile|strangled|tense|terrified|thick|unadulterated|unreadable|unwavering|useless|violent|wounded)(, | and )\b(aborted|anxious|appraising|awkward|beautifully illogical|broken|brutal|calm|charged|clean|clinical|clumsy|coppery|crystalline|deadly|deliberate|dense|desperate|detached|distant|dismissive|faint|fractured|fragile|flickering|gaping|gentle|genuine|gleaming|guttural|gutting|haunting|honest|horrifying|howling|immovable|imposing|jerky|low|melodic|mocking|new|patient|perfect|placid|plodding|pointless|primal|professional|pure|quick|quiet|ragged|resonant|rhythmic|selfless|shaking|sharp|shrill|silent|slow|sterile|strangled|tense|terrified|thick|unadulterated|unreadable|unwavering|useless|violent|wounded)/gi
{{random:$1,$3}}
Minimalism: Double Adverbs
/\b(absently|awkwardly|calmly|carefully|falteringly|gently|gingerly|grudgingly|haltingly|hesitantly|idly|mechanically|nervously|quietly|reluctantly|shakily|silently|slowly|softly|stiffly|subtly|tentatively|tensely|timidly|uncertainly|warily)(?: and|,)\s*(absently|awkwardly|calmly|carefully|falteringly|gently|gingerly|grudgingly|haltingly|hesitantly|idly|mechanically|nervously|quietly|reluctantly|shakily|silently|slowly|softly|stiffly|subtly|tentatively|tensely|timidly|uncertainly|warily)\b,?/gi
{{random:$1,$2}}
[P] Smart Quotes
/(“|”)/g
"
[P] Smart Apostrophes
/(‘|’)/g
'
[P] "s's" plurals/possessive (ex. the witness's -> witness')
s's\b
s'
TRAILING AND DRONING ON......... FUCK YOU BRO!
i type irl for a living and i cant stand hearing this crap. Like shut up. Just finish already
[TO] Remove entire phrase starting with a/an and containing "masterpiece"
/(, )(a|an)([^.]*?\bmasterpiece\b[^.]*?)/g
(empty)
[TO] Replace "dropping to a more intimate, conspiratorial tone."
/(, )(her|their|his|my|our|your) (words|voice|breath|speech) dropping to a more intimate, conspiratorial tone\./gi
$1$2 {{random:voice,tone,volume,cadence,manner,register}} {{random:lowering softly,darkening intimately,slipping deeper,growing low,falling gently,dipping nearer,softening invitingly,lowering secretively,quieting seductively,darkening with intent}}.
[TO] , their voice a X Y.
(, )(his) (voice) (a|an) (\w+)(, )(\w+) (squeak|cry|gasp|shriek|moan|groan|murmur|whisper|yelp|howl|whimper|wail|hiss|rasp|grunt|snarl|sniffle|chuckle|giggle|sigh|sniff|mewl|bark|bleat|croak|mutter|call|hoot|roar|whine)(\.)
$1$2 $3 $4 {{random:$5,$7}} $8$9
[TO] Remove ~ "letting the implication/threat/promise hang in the..." phrases
/(, )letting (the|his|her|their|those) (implication|implications|threat|threats|promise|promises|word|words) hang in the ([^.]+)./g
.
Middle school creative writing fragments
just use one fucking word 💔
[F] came to a(n) (abrupt|sudden)? halt|stop
/came to an? (?:abrupt|sudden)?\s*(halt|stop)/gi
{{random:froze,halted,stopped,stilled,paused,stalled}}
[F] Flood/stream of tears → Tears
/\b(flood of |stream of )(?:\b(\w+)\b\s+)?tears\b/gi
tears
[F] was replaced by something sharper, more assessing → Sharpened / Focused
/\bwas replaced by something sharper, more assessing\b/gi
{{random:sharpened,turned sharp,narrowed in,focused,stilled,shifted subtly}}
Tacky Constructions
Add your own replacement phrases if ya want.
[TC] The questions/answers—(...)—could wait.
/\bThe (answers?|questions?)—([^,]+)—(could wait\.)/gi
{{random:$1 $3,Everything that needed to be asked could wait a little longer.,Nothing demanded an answer just yet.,There would be time enough for words later.}}
[TC] Clean ~low/guttural ~whisper + remove "meant for..." tails
/\b(conspiratorial|low|near|guttural)\b(,\s+|\s+)(guttural\s+)?(whispers?|whispered|whispering|murmurs?|murmured|murmuring|rumbles?|rumbled|rumbling|rasps?|rasped|rasping|words?)\b(,\s*meant\s+for\b[^.?!]*)?/gi
{{random:$1,$3}} $4
[TC] It all (X) into a (Y, Z) wave.
/It all (?:\b(\w+)\b\s+)?into a (\w+)(?:, )?(\w+)? wave\./gi
It all {{random:became pure pressure and noise,hit with no warning,cracked open at the seams,burned straight through the center,crashed down without grace,tore through without mercy,landed without delay,broke past the point of return}}.
[TC] The X, the Y, the Z— → The Z...
/\bThe ([^,]+), \bthe ([^,]+), (\bthe )([^,]+)(—|-|--)/gi
The $4...
[TC] Until X, until Y, until Z → Until X, until Z
/(\buntil [^,]+), \buntil ([^,]+), (\buntil )([^,]+)(.)/gi
$1, $3$4.
[TC] When X—Y—Z → When X, Z
/(When .+?)(—.*?—)(.+)/g
$1, $3
[TC] a X that bordered on Y → Y X
/\b(\w+) that bordered on (\w+)\b/gi
$2 $1
Nothingburger sentences that don't add shit
Just crappy sentences that usually repeat the context of what was already just said lol.
[STC] The air was (...).
/\bThe air was[^.?!]*[.?!]\s*/gi
[STC] But the words were/had/hinted/implied/etc. (...).
/\bBut the words (were|weren't|had|suggested|implied|hinted|that)[^.?!]*[.?!]\s*/gi
[STC] The title was(n't) (...).
/\bThe title (wasn't|was) (a|an)[^.?!]*[.?!]\s*/gi
(empty)
[STC] The (idea/etc) (was/landed/etc) (...).
/\bThe (idea|thought|reality|knowledge|word|words) (that|were|was|felt|hit|pierced|landed)[^.?!]*[.?!]\s*/gi