Livejournal
Log in
Post
Friends
My journal
shoorick
Однострочник для извлечения принадлежащих одному домену ссылок из HTML и обычного текста
Oct 07, 2011 23:56
perl -nle 'print $1 while m!(
http://example.com/[^
" >]+)!g'
Для входящих данных
one
and
two
http://example.com/first
and
http://example.com/second
none
возвращает
http://example.com/one
http://example.com/two
http://example.com/first
http://example.com/second
В виде обычного перлового скрипта - на гитхабе
.
github
,
html
,
вебмастерство
,
программизм
,
perl
,
ссылка
Leave a comment
Read comments 3
Previous post
Next post
Up