[8] Results

Golang : Validate hostname

golang validate hostname regular-expression regexp compile

Problem :

You need to validate if a given string is a valid hostname or not. Hostnames such as :

.... read more

Golang : Extract part of string with regular expression

golang regular-expression regexp extract-string

Below is a simple example of how to extract a specific part of a string with the help of regular….... read more

Golang : error parsing regexp: invalid or unsupported Perl syntax

golang regular-expression unsupported-perl-syntax

Compiling and running Golang program will throw out some odd error messages sometimes. Got one today with this error message….... read more

Golang : Underscore string example

golang underscore regexp regular-expression trim


Your program needs to process data with whitespaces and quotes. You need a quick way to remove underscore characters….... read more

Golang : Use regular expression to get all upper case or lower case characters example

golang regular-expression regexp string upper lower

This is an add-on for the previous tutorial on how to get all upper case or lower case….... read more

Golang : Create unique title slugs example

golang title-slug database-query seo regular-expression

A simple example on how to create title slug from a string and also demonstrate what you can do in….... read more

Golang : Validate IP address

golang validate ip-address regular-expression regexp compile

Problem :

You need to validate if a given IP address string is a valid IP address.

Solution :

Use….... read more

Golang : Valued expressions and functions example

golang valued-expression-function fmt

Writing this simple example down here as a reminder for myself on how to use valued expressions in Golang. Nothing….... read more