The rules of the regex are simple:
- Split by NOT: a whitespace
" "
followed by 'OR' or '|' :
Example:
"thing to say" france (true)
"thing to say" OR thing (false)
"thing to say" | thing (false)
I'm trying to find a regex to help me do that (with a pregs_split)
I only could do something like /\||OR| \|| OR| \| | OR |\| | OR/
really basic but I need a regex for the opposite case.