开发者

Simple Regex Help

开发者 https://www.devze.com 2022-12-17 06:09 出处:网络
How can I match strings w开发者_运维知识库ithout a dot in regex, for example, these should be matched:

How can I match strings w开发者_运维知识库ithout a dot in regex, for example, these should be matched:

a/b
אאא/תתת
a
b
c
ג
123/1

but these shouldn't:

abc.asp
ddd.css
style/main.css

For .NET Syntax. Thank you.


The regex

^[^.]*$

matches a string not containing a dot.


[^.] will match every character except the dot.

0

精彩评论

暂无评论...
验证码 换一张
取 消