Js regular validation of js expressions and value?

var key = ?  //(key)
var str1 = `{{${key} ? ${key}:"nihao"}}`
var str2 = `{{ ${key} && "nihao"}}`
var str3 = `{{ "nihao" || ${key} }}`

reg.test(str1) && reg.test(str2) && reg.test(str3) === true

reg =?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37ac2-2c094.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37ac2-2c094.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?