Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
字符串示例:
a1-a2.b1-b2-b3.c1-c2
需要提取如下字段:
a1-a2 b1-b2-b3 c1-c2
一组带有连字符并用点分隔的单词
您可以使用此正则表达式:
[^\.]*
并将所有匹配项与g修饰符匹配。
g
正则表达式测试器