开发者

Handle the Expression in regex?

Expression开发者_如何学Go allows only "_” ,“-“ ,".mst" and ".". And should not allow forward and backward slash(/,).

Anyone can help me out. Thanks


Assuming that you're trying to match some kind of a filename, that one should do it:

(\w|_|-|\.)+\.mst$


Use this:

([_-.]|(\.mst))+

This matches any combination of the values you specified. If you want the expression to match only one of them, remove the plus sign at the end. If you have other rules, you should post them.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜