我正在尝试使用以下正则表达式获取 UNIX 绝对路径:
"?[a-zA-Z0-9\/].*\.[a-zA-Z0-9].*"?
问题是这个正则表达式匹配:
"/home/user/web/other.longextension"
/path/to/file.php
并匹配这个(不需要的)链接:http: //google.com https://web.com ftp://other.com
并且不匹配(想要):'/path/to/any/file.txt' /this/path/too
谢谢