Given the statement
/(?<=.*)./.match("abc")
I get an error that there is an invalid pattern in the look behind.
Replacing (?<=.*)
with (?<=.)
yields an answer.
Similar issues occur when using +
in place of *
.
Why does the *
repetition metacharacter cause an error to be thrown?
Using Ruby 2.5.0.