Hackerrank – Find a Substring

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

Solution
For all lines cout all ocurrences of this regex pattern:
\w+{substring}\w+

I created solution in:

All solutions are also available on my GitHub.

Java

JavaScript

Scala

Ruby