0

I have been trying to remove rows that have non-english words in Postgresql. However, it does not seem working. This is my current code and sample data:

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

enter image description here

Sriram
  • 348
  • 2
  • 13

1 Answers1

1

You need a regular expression match with the ~ operator:

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

You might want to add other characters like space or - to the list in the brackets.

Laurenz Albe
  • 167,868
  • 16
  • 137
  • 184