Moderator: Neosoft Support
I wanted to say that for example if I have a String that says "Hello, visit me on my website http://www.mi-sitio.com" is returned: "Hello, visit me on my website <a> http://www.mi-sitio.com </a> ".That is, that links are recognized in a string and that they are shown as such, and not as a simple text.
<a href="https://www.neosoftware.com">Visit NeoSoft Corp</a>
what I need is for the program to recognize when it is a link, for example if it starts with http, or https, or www or ends in a .com. That converts that part into a link (from text to link). The initial text would be for example in a variable.
Gaev, I think those cases would be enough, the problem is to find the link in the middle of a String.
(space)http://www.website.com(space)
(space)http://www.website.com?name=Smith(space)
$('p').each(function(){
$(this).html( $(this).html().replace(/((http|https|ftp):\/\/[\w?=&.\/-;#~%-]+(?![\w\s?&.\/;#~%"=-]*>))/g, '<a href="$1">$1</a> ') );
});
(Http, https, www)
(.com .net .org .info .tv .biz .ws. Com.ar)
It does not matter if it ends with .com, .edu. Net. Or whatever, if it is a link it should convert it to such.
I understand that to do the routine we should detect the beginning that could well contain these beginnings: (Http, https, www)
www.abc.com
and
subdomain.www.abc.com
And the endings that could have these: (.com .net .org .info .tv .biz .ws. Com.ar)
Return to General NeoAppBuilder Discussion
Users browsing this forum: No registered users and 2 guests