pythongosssss / ComfyUI-Custom-Scripts

Enhancements & experiments for ComfyUI, mostly focusing on UI features
MIT License
1.38k stars 104 forks source link

String Function regex does not support number quantifier {n}? #202

Closed ManOrMonster closed 3 months ago

ManOrMonster commented 4 months ago

I'm trying to make a simple regex replace in String Function that grabs 35 characters and adds cr\newline after. Using the standard number quantifier {n} doesn't work, and in fact it seems to ignore curly braces completely.

Using /(.{35})/ doesn't work:

image

This works, but it's a little unwieldy:

image

Using, for example, /(.{5})/, the output is just the same as using /(.5)/:

image
pythongosssss commented 3 months ago

This should be fixed