On Mariadb 10.3 I'm trying to update a new column with an expresion below using Nim db_mysql. The ? in the Regex causes an expected error.
db.exec(sql"UPDATE logs SET uo = REGEXP_SUBSTR(log, '(?<=\\^UO)\\w+')")
I've tried without success:
db.exec(sql"UPDATE logs SET uo = REGEXP_SUBSTR(log, '(?<=\\^UO)\\w+')", '?')
db.exec(sql"UPDATE logs SET uo = REGEXP_SUBSTR(log, '(?<=\\^UO)\\w+')", "?")
db.exec(sql"UPDATE logs SET uo = REGEXP_SUBSTR(log, '(?<=\\^UO)\\w+')", "\?")
I could use REGEXP_REPLACE(log,'(.+\^UO)(\w+)(.+)','\2') as an alternative but I'm curious if there is a way to do the first example.