Answer the question
In order to leave comments, you need to log in
Replacing the domain with *?
Hello!
We have a domain "test.ua"
I need to find all links in the text that are not in our domain and replace this domain with "*".
Links can be without http\https, but can be with them
Expected result:
goolge.com -> http://******.com
https://goolge.com/test -> https://* *****.com/test
goolge.com -> ******.com
test.ua -> test.ua
Answer the question
In order to leave comments, you need to log in
domain search
https://regex101.com/r/wJqhj6/1
goolge.com -> http://******.com https://goolge.com/test -> https://******.com/test goolge.com -> ******.com test.ua -> test.ua
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question