I am trying to filter some reporting results (Google Analytics - Javascript regex support) to only include rows that contain the pattern "OA", "OA" cannot be the last characters in the string. My regex below solves for the "last characters in the string issue", but doesn't restrict the match to only those rows that have some instance of "OA" in them. Should I include another OR statement to capture that or should I update my current regex to account for that
E.g. Text (Expected results):
OA > OA //No Match
Paid Search > OA //No Match
Paid Search > (none) > Social //No Match
OA > Paid Search //Match
Social > OA > (none) > (none) //Match
Regex:
.{,2}$|.*[^OA]$
OA(?!$). @HuStmpHrrr suggested (in a deleted answer) aOA.that should actually work for you.OAat the end. your re seems simpler than mine. updated: actually no, that re behaves the same as what I proposed and will also match the first case.