Код: Выделить всё
a) https://url:port/abc
b) https://url:port/abc/{uid}
c) https://url:port/abc/{uid}/def
< /code>
Чтобы выяснить тип URL (a, b или c), я делаю: < /p>
Pattern a = Pattern.compile(".*\\/abc$");
Pattern b = ??
Pattern c = Pattern.compile(".*\\/abc\\/(.*?)\\/def$");
Подробнее здесь: https://stackoverflow.com/questions/498 ... a-url-path