Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个网址:
http://www.xxxxxxxx.it/stagione.shtml#giornata_107
我试图用这样的正则表达式获取 giornata 的数量:
<!--#set var="giornata" value="$QUERY_STRING = /\#giornata\_([0-9])/"-->
但我不知道正确的语法
谢谢
您需要匹配一个或多个数字,[0-9]+而不是只[0-9]匹配一个数字:
[0-9]+
[0-9]
<!--#set var="giornata" value="$QUERY_STRING = /\#giornata\_([0-9]+)/"-->