开发者

Regular expression required [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

Please give me one regular expression which mathes these kind of name formats like:

1) M/S.KHALIL WARDE S.A.L.

2) Oliver Twist

Th开发者_Python百科e expression should allow alphabets, dot, space and / only.

thanks


Perhaps:

^[A-Za-z. /]+$

That matches uppercase A-Z, lowercase a-z, dot, space, and slash. The + means repeated one or more times (so this won't match an empty string). The leading ^ and trailing $ means the match is "anchored" to the start and end of the string, so it will check your whole string.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜