<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Valid on Gopher Coding</title><link>https://gophercoding.com/tags/valid/</link><description>Recent content in Valid on Gopher Coding</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Mon, 04 Nov 2024 09:41:37 +0000</lastBuildDate><atom:link href="https://gophercoding.com/tags/valid/index.xml" rel="self" type="application/rss+xml"/><item><title>Check If a URL is Valid</title><link>https://gophercoding.com/is-url-valid/</link><pubDate>Mon, 04 Nov 2024 08:00:00 +0000</pubDate><guid>https://gophercoding.com/is-url-valid/</guid><description>&lt;p>This is just a quick post showing how we can check if a &lt;a href="https://en.wikipedia.org/wiki/URL">URL&lt;/a> is a valid one. URLs are often passed from &lt;strong>third parties&lt;/strong> or user input, so they need to be checked before used. This function allows you to do just that, it will return &lt;em>true&lt;/em> if the string is a valid URL. Feel free to copy and paste it and go from there.&lt;/p>
&lt;p>e.g. valid &amp;ldquo;&lt;a href="https://gophercoding.com/%22">https://gophercoding.com/&amp;quot;&lt;/a>&lt;/p>
&lt;p>e.g. invalid &amp;ldquo;test string&amp;rdquo;&lt;/p></description></item></channel></rss>