r/Python • • Oct 24 '14

LF help to parse a cisco show command.

I have a text file with output similar to this.

I need to parse it so it looks like a csv. The problem is some interface names contain spaces so I cant just replace the spaces with a comma.

0 Upvotes

1 comment sorted by

1

u/vindolin Oct 24 '14

Learn Regular Expressions, they are an indispensable tool!

Once learned, you will wonder how you could live without them.