Clickable Link
in
Programming Questions
•
1 year ago
Hi,
I've a chunk of text and i'd managed to split it up and detect which is a link using regex, the problem i have here is how am i to make that link clickable?
if i use link(), it will open the url for me automatically, but i want it to open when i click it.
is there any function to do that?
below is my code
String message = msg;
String[] list = split(message, ' ');
String checkURL = "^
http://([^/]+)(/.*$)";
for (int a = 0; a<list.length; a++){
if (list[a].matches(checkURL))link(list[a]);
message = join(list, " ");
};
words.add(message);
what i want to do is use a function to make the url clickable and join the split text back to one again.
Hope you people could give some suggestion, Thanks.
1