Closed cecoates closed 4 years ago
I'm trying to use the regex replace feature, but running into trouble trying to remove parts of the URL. Such as removing HTTP, HTTPS, and www.
However, it doesn't seem to work if you try and use an empty string as the replacement.
For example:
{{url.s("\^(?:https?:\/\/)?(?:www\.)?","")}}
Does not work.
Neither does:
{{url.s("\^(?:https?:\/\/)?(?:www\.)?","\^$")}}
or
{{url.s("\^(?:https?:\/\/)?(?:www\.)?","^$")}}
The closest option is to use a single space, like this:
{{url.s("\^(?:https?:\/\/)?(?:www\.)?"," ")}}
Is it not possible to delete part of the URL/text?
The extension is very handy so far, thanks!
I'm trying to use the regex replace feature, but running into trouble trying to remove parts of the URL. Such as removing HTTP, HTTPS, and www.
However, it doesn't seem to work if you try and use an empty string as the replacement.
For example:
Does not work.
Neither does:
or
The closest option is to use a single space, like this:
Is it not possible to delete part of the URL/text?
The extension is very handy so far, thanks!