谢谢各位,sql里解决了
substr(rtrim(rtrim(SIGENAME),')'),-18,18)
JOINARRAY(split('李四33445519990202993X',"[^0-9X]"),"")
确定一个大致范围,比如从最左边还是最后边开始是身份证,身份证固定是18位,比如结尾最后是身份证,就使用Right函数截取Right(字符串,18),即可截取成功,大概就这么个思路
SUBSTITUTE(GREPARRAY(split(a12,""), regexp(item, "[0-9X]")),",","")