سؤال

Is there a Perl module that detects URLs?

For example, if I have a string 'xyz' it says that is not a URL, and if I have a string 'http://stackoverflow.com', it says that is a URL.

هل كانت مفيدة؟

المحلول 2

If all you want to do is detect if you've got a URI, you can use Data:Validate:URI. If you need to do parsing as well, you should use URI:URL.

Good luck.

نصائح أخرى

For all your URL parsing and manipulation needs, you want URI::URL.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top