正则表达式: \b\d\S*\b
可以匹配依赖的版本号
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.google.code.gson:gson:2.8.5'
本文介绍了一种使用正则表达式来匹配依赖库版本号的方法。通过简单的正则表达式:dS*, 可以有效地从代码中提取出如 '1.1.1' 或 '2.8.5' 这样的版本号。
正则表达式: \b\d\S*\b
可以匹配依赖的版本号
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.google.code.gson:gson:2.8.5'
8340

被折叠的 条评论
为什么被折叠?