如何删除 Postgresql 中的非英文字符

How to remove Non-English characters in Postgresql

我一直在尝试删除 Postgresql 中包含非英语单词的行。但是,它似乎不起作用。这是我当前的代码和示例数据:

Select
translationid,
medium
from translation
where medium like '%[^A-Z,a-z]%'

您需要与 ~ 运算符匹配的正则表达式:

WHERE NOT meduim ~ '[^A-Za-z]'

您可能想要将 space 或 - 等其他字符添加到括号中的列表中。