即它仅需要在这些URL中找到第一个内容:
https://localhost/dfkdfjkdfjkdfkj/Content/dfdfdfdf.png
https://localhost/wwwrootExtra/Content/dfdfdfdf.png
https://localhost/dfkdfjkdfjkdfkj/ConTent/Images/ConTent/Patrol.png
并且在这些URL中找不到任何Content实例:
https://localhost/MangoTrunkDebug/wwwRoot/ConTent/dffddf.png
https://localhost/MangoTrunkDebug/wwwRoot/ConTent/Images/ConTent/Patrol.png
我目前为止还没有,但是现在很挣扎:
(?<!(?i)\/wwwroot)\/(?i)Content\/
这仍然会选择第一个实例之外的内容。
将不胜感激。
我需要能够识别URL中Content的第一个实例,但不能识别那些包含wwwroot的URL。我不希望它找到Content的任何后续实例,并且...
(?<!(?i)\/wwwroot)
在两种情况下均有效。