I have the following strings
https://test.com/fi/wp-content
https://test.com/fr
https://test.com/es
https://test.com/
https://test.com/wp-content/
https://test.com/image.png
https://test.com/de/wp-content/themes
https://test.com/es
https://test.com/fr
https://test.com/no
https://test.com/da
https://test.com/en
https://test.com/de
https://test.com/nl/wp-content
https://test.com/fi
As far as now I have the following regex
/\btest.com.*\.*(?<!fr|es|da|no|en|de|nl|fi)$/gm
I want to match the following (image 1)

Im almost there but my regex matches everything after my expression like this (image 2):

I can seem to figure out how to get the end of my regex to behave so it produces the match as image 1. Here is a regex101: https://regex101.com/r/Tv0AjJ/1
\btest\.com\/(?!fr|es|d[ae]|no|en|nl|fi)regex101.com/r/P5dgv8/1/(?<=https?://)([^/]+)/)/\btest\.com\/(?!(?:fr|es|da|no|en|de|nl|fi)\/)or even\btest\.com\/(?!(?:fr|es|da|no|en|de|nl|fi)(?:\/|$))