Browsing StarfallEx's section
← Back to ACE
💬

Community answer

Collected from the ACE community Discord archive around 2022-02-20. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

string.gsub 'Regex is too complex' on texture names

⭐ StarfallUpdated 2 days ago•0 views
Simplify the pattern or split it - e.g. string.gsub(name, "_[+-]?%d+", "", 3) with a count limit, or run multiple simpler gsubs instead of one big pattern.

Why does gsub with a complex pattern error 'Regex is too complex! 3 ext search length too long'

Simplify the pattern or split it - e.g. string.gsub(name, "_[+-]?%d+", "", 3) with a count limit, or run multiple simpler gsubs instead of one big pattern.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.