开发者

Allow dots in URL using regex [closed]

开发者 https://www.devze.com 2023-03-07 03:33 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
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 11 years ago.

How can I allow a dot in an URL using Regex? Any advice?

thanks


\. will allow you to match a dot. How you insert that into your regex depends on how you've created your regex.


. in a regex allows any character (except newlines, depending on the engine and its options), so you have to escape it as \.


Since you're being vague, so will I:

\.

There's the regex to allow a dot.


use the \ to escape native match chrs

0

精彩评论

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