Hackerrank – Alien Username

Problem Statement
A description of the problem can be found on Hackerrank.

Solution
Regular Expression that validates input username:
^[_\.]\d+[a-zA-Z]*_?$

I created solution in:

All solutions are also available on my GitHub.

Java

JavaScript

Scala

Ruby