查找RegExp以删除dart/flutter中括号之间的文本。例如
输入..。
Test Message (To Be removed)输出
Test MessageString str = "Test Message (To Be removed)";
str.replaceAll(RegExp(<regular-expression>), '');发布于 2022-01-06 16:14:21
嗨,你可以用这个RegExp
String str = "Test Message (To Be removed)";
var test = str.replaceAll(RegExp('\\(.*?\\)'), '');
print(test);发布于 2022-01-07 05:46:01
另一个RegExp
RegExp(r'\((.*)\)')https://stackoverflow.com/questions/70609591
复制相似问题