以下の文字列があります。
"g1_fim[7,8] || '/' || g1_fim[5,6] || '/' || g1_fim[1,4] dt_final, campo1, campo2 WHERE **d1_fim || d2_teste** = 'sadasd'"
X||X (二重パイプの前後のテキスト) に一致する正規表現が欲しい
結果は、次の 2 つの一致のようになります。
1. g1_fim[7,8]||'/'||g1_fim[5,6]||'/'||g1_fim[1,4]
2. d1_fim||d2_teste
この表現を使ってみました.*?(\|\|).*?(?=\s)
結果は次のとおりです。
1. g1_fim[7,8]||'/'||g1_fim[5,6]||'/'||g1_fim[1,4] ( its ok !!! )
2. dt_final, campo1, campo2 WHERE d1_fim||d2_teste (it´s not ok, I´d like to return here only the 'd1_fim||d2_teste' )