simplifyRoomId function
- String name
Implementation
String? simplifyRoomId(String name) {
// example - !qporfwt:matrix.org
RegExp re = RegExp(r'^!(\w+([\.-]?\w+)*):\w+([\.-]?\w+)*(\.\w+)+$');
RegExpMatch? match = re.firstMatch(name);
if (match != null) {
return match.group(1);
}
return name;
}