3
我想在包含阿拉伯文和英文文本的postgres數據庫中搜索表格。例如:如何在postgresql中搜索不同的字符集?
id | content
-----------------
1 | دجاج
2 | chicken
3 | دجاج chicken
結果會得到我的第3行
我想這與限制使用正則表達式的字符做的,但我不能找到一個乾淨的解決方案,以選擇兩個。我嘗試過:
SELECT regexp_matches(content, '^([x00-\xFF]+[a-zA-Z][x00-\xFF]+)*')
FROM mg.messages;
但是,這隻能匹配英文和{}內的一些非英文字符。
你嘗試過什麼?你在哪裏找它?你的樣本數據和預期產出是什麼? – Rachcha
@Rachcha你是對的。我編輯我的問題更有意義。 – Slamice