stripVersionSuffix function
Implementation
String stripVersionSuffix(String activityType) {
// Matches: underscore + 'V' + digits at the very end of the string
final versionSuffix = RegExp(r'_V\d+$');
return activityType.replaceAll(versionSuffix, '');
}