regex for valid ftp file path
I am looking for validating a textbox in my asp.net application for a valid file path like
- \\127.0.0.1\folder
- 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
精彩评论