我正在寻找一个正则表达式。
文本示例
1 Match
1.1 Match
45.67.21234.3 Match
1 Does not match1
12. Does not match
提取/匹配的值应为:
1
1.1
45.67.21234.31
这些不应匹配:
1 Does not match1 // no match because of an additional digit in the text
12. Does not match // no match because of the dot after 12
到目前为止,我的正则表达式如下所示:
(\d+\.)+\d
但这与第一个条目不匹配。
汪汪一只猫
HUH函数
繁华开满天机
相关分类