^start of string
\Sany non-whitespace character
.{0,62}any character (except for line terminators), repeated between 0 and 62 times
\Sany non-whitespace character
$end of string, or before its final line terminator
g modifier: global. Finds all matches instead of stopping after the first