正则匹配文中是否有加密货币
侧边栏壁纸
博主昵称
路过的假面骑士

记住了 我只是个路过的假面骑士

  • 累计撰写 88 篇文章
  • 累计收到 2 条评论

正则匹配文中是否有加密货币

narakuyang
2023-02-20 / 0 评论 / 20 阅读 / 正在检测是否收录...

getTextTokenName({required String text}) {
List cryptoNames = [];
String str = "$text";
RegExp r = RegExp(r"$[a-zA-Z]*");

Iterable matches = r.allMatches(text);
for (Match m in matches) {

cryptoNames.add(m.group(0)!.substring(1));
print(cryptoNames);

}
return cryptoNames;
}

0

评论

博主关闭了所有页面的评论