What I want is a way similar to regular expressions in finding text patterns. But my question is about python objects followed by one of their methods; like the following: