[英]Regex python: end of the string in a list
我在 python 中有以下正則表達式:
http://www\..+\..*?[$/]
它應該抓住:
http://blabla.com/test/ => http://blabla.com/ # Work
http://blabla.com => http://blabla.com # Doesn't work
我想這是因為$
int [ ]
。 如何在這樣的列表中結束字符串?
換句話說,你要么在末尾有一個斜杠,要么你沒有:
http://www\..+\..*?/?$
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.