enrique-j
8/22/2017 - 6:08 PM

ejemplos.md

#evaluar query and or , parentesis

  1. (\w+\s)(AND|and|OR|or)\s(\w+|(+\S\w+)

  2. (\w+\s)(AND|and|OR|or)\s+((\w+)|[(]+\S\w+\s(((AND|and|OR|or)\s+\w+)))

  3. (\w+\s)(AND|and|OR|or)\s+((\w+)|[(]+\S\w+\s(AND|and|OR|or)\s+\w+[)](\s|(AND|and|OR|or)[(]\w+\s(AND|and|OR|or)\s\w+[)]{2}))

  4. (\w+\s)(AND|and|OR|or)\s+((\w+)|[(]+\S\w+\s(AND|and|OR|or)\s+\w+[)](\s|(AND|and|OR|or)[(]\w+\s(AND|and|OR|or)\s\w+([)]{2}|[)]{1}(AND|and|OR|or)[(]{1}\w+\s(AND|and|OR|or)\s\w+([)]{2}|[)]{1}(AND|and|OR|or)[(]{1}\w+\s(AND|and|OR|or)\s\w+[)]{2}))))

  5. (\w+\s)(AND|and|OR|or)\s+((\w+)|[(]+\S\w+\s(AND|and|OR|or)\s+\w+[)](\s|(AND|and|OR|or)[(]\w+\s(AND|and|OR|or)\s\w+([)]{2}|[)]{1}(AND|and|OR|or)[(]{1}\w+\s(AND|and|OR|or)\s\w+([)]{2}|[)]{1}(AND|and|OR|or)[(]{1}\w+\s(AND|and|OR|or)\s\w+([)]{2}|[)]{1}(AND|and|OR|or)[(]{1}\w+\s(AND|and|OR|or)\s\w+[)]{2})))))

  6. ((?I)(?!and|or)\w+\s)(?I)(and|or)\s+(((?I)(?!and|or)\w+)|[(]+\S(?I)(?!and|or)\w+\s(?I)(and|or)\s+(?I)(?!and|or)\w+[)](\s|(?I)(and|or)((?!and|or)\w+\s(?I)(and|or)\s(?I)(?!and|or)\w+([)]{2}|[)]{1}(?I)(and|or)[(]{1}(?I)(?!and|or)\w+\s(?I)(and|or)\s(?I)(?!and|or)\w+([)]{2}|[)]{1}(?I)(and|or)[(]{1}(?I)(?!and|or)\w+\s(?I)(and|or)\s(?I)(?!and|or)\w+([)]{2}|[)]{1}(?I)(and|or)[(]{1}(?I)(?!and|or)\w+\s(?I)(and|or)\s(?I)(?!and|or)\w+[)]{2}))))) Pruebas

-Validas f1 or f2_1

f1 and f2_2

f1 and (f2 or f3)

f1 or (f2 and f3)

f1 and ((f2 and f3)or(f4 and f5))

f1 or ((f2 or f3)and(f4 or f5))

f1 or ((f2 or f3)and(f4 or f5)and(f6 and f7))

f1 or ((f2 or f3)and(f4 or f5)and(f6 and f7)OR(f8_1 and f9_2))

-No validas

f1 or ((f2 or f3)and(f4 or f5)and(f6 and f7)OR(f8_1 and f9_2)

f1 or ((f2 or f3)and(f4 or f5)and(f6 and f7)

f1 or ((f2 or f3)and(f4 or f5)

f1 and (f2 or f3))

f1 an frr

f1 and f2 or f3)

#Cambio de valor

(ab)\s(cd)\s(\2)\s(\1)

Resultado: ab cd cd ab

#Busca que no contenga la palabra

(?!.(and|or)).\w+

#Aparicon de and or al principio

(?!and|or)\w+

#SENSITIVE DE AND OR

(\w+\s(?I)(and|or))