Problem creating a regular expression to parse open-iscsi, iscsiadm output (help?)

rice.stew at gmail.com rice.stew at gmail.com
Fri Jun 14 15:09:08 EDT 2013


On Thursday, June 13, 2013 3:17:28 AM UTC-4, Andreas Perstinger wrote:
> On 13.06.2013 02:59, rice.cruft at gmail.com wrote:
> 
> > I am parsing the output of an open-iscsi command that contains
> 
> > severalblocks of data for each data set. Each block has the format:
> 
> [SNIP]
 
> 
> for your example (same for the original regex).
> 
> It looks like it works (Python 2.7.3) and there is something else 
> 
> breaking the regex.
> 
> 
> 
> Bye, Andreas

Indeed. "there is something else breaking the regex."  ..and a note if you are trying this regex. You need to have more than one block of Target data to see issues related to scanning multiple instances of the data. My regex works as expected if I leave those two lines related to the iSCSI Connection and Session states. For now I am scratching my head...




More information about the Python-list mailing list