Check if a string is entirely made of the same substring This is taken from this question (with permission ofcourse). I'll quote:


  Create a function which takes a string, and it should return true or
  false based on whether the input consists of only a repeated character
  sequence. The length of given string is always greater than 1 and the
  character sequence must have at least one repetition.


Some examples:

'aa' //true
'aaa' //true
'abcabcabc' //true
'aba' //false
'ababa' //false
'weqweqweqweqweqw' // false


Specifically, the check for a string strictly composed of repeating substrings (Update) can output any true or false representation, but no error output please. Strictly alphhanumeric strings. Otherwise standard code golf rules. This is Code Golf, so shortest answer in bytes for each language wins.
JavaScript (ES6), 22 bytes

Returns a Boolean value.



s=&gt;/^(.*)\1+$/.test(s)


Try it online!



Without a regular expression, &nbsp;33&nbsp; 29 bytes

Returns either null (falsy) or an object (truthy).



s=&gt;(s+s).slice(1,-1).match(s)


Try it online!

NB: Technically, \$s\$ is converted to a regular expression for match(), so the above title is a lie.