1

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
  • 433
  • 4
  • 20

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
  • 209,280
  • 17
  • 206
  • 263