I want to remove all the character after a non-alphanumerical character ('_') within a string. For example:
Petr_;Y -> Petr
ČEZ_^(České_energetické_závody) -> ČEZ
I tried:
''.join(c for c in mystring if c.isalnum())
But this way I'm stripping off only alphanumerical characters itself.
Help would be appreciated.