I want to catch Sistemas Operativos in No aprobó ni está inscripto a Sistemas Operativos (Ord. 1150). The (Ord. 1150) is optional. It can appear, or not.
Mi first try was:
No aprobó ni está inscripto a (.*)( \(Ord\. 1150\))? but this returned (u'Sistemas Operativos (Ord. 1150)', None).
So, what's the correct regex?
I'm using re in Python.
Update: I don't need to catch specifically the string 'Sistemas Operativos', that string is just an example. There could be any other string, but the context (No aprobó ni está inscripto a .* (Ord.1150)) will be always the same. See the comment by @DSM here.
 
    
 
     
    