I'm using Linkify to detect tags(#) in a TextView.
Pattern userMatcher = Pattern.compile("\\B@[^:\\s]+");
String userViewURL = "https://www.instagram.com/explore/tags/";
Linkify.addLinks(tvComment, userMatcher, userViewURL);
The url is supposed to end up with this text without '#' character.
I want to use it to search Instagram:
https://www.instagram.com/explore/tags/mytag
but Linkify opens a url with '#' character:
https://www.instagram.com/explore/tags/#mytag
How can I remove '#' character from the link created with Linkify.