Use static regex for reusable objects, Simplify loops and avoid creating iterator on temporary
See https://invent.kde.org/sdk/clazy/-/blob/master/docs/checks/README-use-static-qregularexpression.md and This can lead to undefined behavior when detaching the value