Is it possible to simulate re.findall in the pexpect module?
I currently have a script that ssh's into a server using pexpect. I then have it send a command to the server which returns a bunch of lines in p.before (p being a pexpect spawn):
JUNK JUNK JUNK IP ADDRESS 10.0.0.1 JUNK JUNK
JUNK IP ADDRESS 10.0.0.3 JUNK JUNK JUNK
JUNK JUNK JUNK
IP ADDRESS 10.0.0.2 JUNK JUNK JUNK JUNK
Note: The ip addresses I used in the example are random ones I used just for this example. In the actual script, it can be any ip address. The information I am trying to find are the ip addresses.
Can pexpect do something like re.findall? Or do I have to do re.findall(regex, p.before)?