I'm trying to use a regular expression that I know about, but it doesn't seem to work in MYSQL v8.0. I'm trying to extract the filename (something.txt) from some_str variable. It keeps returning NULL. Not sure what I'm doing wrong in the pattern.
set @some_str = "{'A': 1234, 'fname': 'something.txt'}"; select regexp_substr(@some_str, "\{'\w+':\s+\d+,\s+'\w+':\s+'(.+)'\}") ; -- should return: something.txt