lib: internal: nativeresolver: autoremovalpossibility: refactoring: use stringToRegex