Вопрос

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