I am writing a discussion on a forum such as a forum in Perl and would like to automatically change http://www.google.com as an HTML link. It should also be safe and fallible in terms of security. Is there a quick, easy, and safe way to add links automatically?
Try something like this:
use Regexp::Common qw /URI/; $text =~ s|($RE{URI}{HTTP})(?!</a>)|<a href="$1">$1</a>|g
Regexp:: Common:: URI, , , URL-, , . , , URL- . , , - - :
<a href="http://www.mysite.com">http://www.mysite.com is my website</a>
, URL-, .
Source: https://habr.com/ru/post/1707947/More articles:Why are my JDialogs leaking? - javaHow to determine the direction of finger movement using iPhone UITouch - directionSolr syntax request syntax - solrhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1707945/is-it-possible-to-revert-an-entire-svn-repository&usg=ALkJrhi2ufi-YyjH1tWxYpThsbiXTb89IgWhat is the optimal size for a class file? - classWindows Explorer - Dynamic icons for identical file extensions - visual-studiodelete page from text - urlEvent handler called only on second click - event-handlingJBoss UnknownHostException when on another network - java.NET for editing XML / XSL? - xmlAll Articles