开发者

regex for valid ftp file path

I am looking for validating a textbox in my asp.net application for a valid file path like

  1. \\127.0.0.1\folder
  2. http://ftp.g开发者_开发问答oogle.com and all other valid file paths


Indeed, it can be solved using Regex, but too complex for such a task, and it is slow. In my opinion, the best solution for your problem is not regex. You can easily validate file path by utilizing built-in ASP string functions, such as InStr, Left, Right, Mid, Len, etc.

Good Resource to Read:

  • ASP String Function List
  • String Handling functions in ASP
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜