I am trying to convert CamelCase to either snake case or separated by a delimiter using regex in SQL (AWS Redshift). So something like
regexp_replace(MyString, '([A-Z]+)', '-$1')
except I need to specify not at the beginning of the string. Right now,
MyString -> -my-string instead of my-string.
How do I do this?