10
Can anyone assist with correcting my KRename regex?
(kbin.social)
KDE is an international technology team creating user-friendly free and open source software for desktop and portable computing. KDE’s software runs on GNU/Linux, BSD and other operating systems, including Windows.
If you encounter a bug, proceed to https://bugs.kde.org, check whether it has been reported.
If it hasn't, report it yourself.
PLEASE THINK CAREFULLY BEFORE POSTING HERE.
Developers do not look for reports on social media, so they will not see it and all it does is clutter up the feed.
I think you want something like
\s*\(((?!ver\s\d).)*\)\s*
See regexr.com/7jbvk
Basically this consumes all characters between parentheticals with whitespace unless the next character set in the parentheticals is
ver
followed by a number. Now this uses a negative lookahead which might not be supported by the engine that krename is using. You can also explicitly construct the group to not match, but that's rather painful, see here