動作しない、 赤方偏移は、このようなエラーが返されます。赤方偏移/正規表現(否定先読みが)
-- Find records that do not start with abc
select * from table_a where column_a ~ '^(?!abc).+$'
Error: PG::InternalError: ERROR: Invalid preceding regular expression prior to repetition operator. The error occured while parsing the regular expression: '^(?>>>HERE>>>!abc).+$'. DETAIL: ----------------------------------------------- error: Invalid preceding regular expression prior to repetition operator. The error occured while parsing the regular expression: '^(?>>>HERE>>>!abc).+$'. code: 8002 context: T_regexp_init query: 1039510 location: funcs_expr.cpp:130
を赤方偏移がないように見えます否定的な先読みを認識しない...
Redshiftで使用できる方法はありますか?
あなたの意向は何ですか?あなたは一致する必要がありますか? 'abc'と等しくない文字列ですか? Redshiftの正規表現の味はPOSIXなので、どのような視点も使用できません。 –
ご意見ありがとうございます。私は私の意図を示すために質問を更新しました。しかし、利用可能なルックアラウンドはありません...? :( – sora
) 'abc'で始まらないエントリにマッチさせたいのですが、ここで' 'column_a! ''^abc''を試してみてください。(否定を正しく使う方法はわかりません) –