I need to find following kind of links having the same beginning but a different ending.

http://www.domain.com/buy/best%20iphone%20leather%20case.html

the links always start with http://www.domain.com/buy/ but can end with different links:

best%20iphone%20leather%20case.html
best%20ipad%20chargers.html
etc..
有帮助吗?

解决方案

Your start string is fixed so will just have to use:

^http://www\.domain\.com/buy/.*\.html

^ is used in regular expression to point beginning with 'string/word/character'.

You may have to escape '/' and '.' putting '\' just before these characters.

其他提示

Use this regex:

^http://www\.domain\.com/buy/.+?html
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top