I'm working on complex research into router configuration. I have created many macros to do all kinds of useful things.
However, I'm stumped even how to ask this question completely. (which is why I'm here now)
I have a column of cells that contain multiple lines in each cell. I need to extract every line that starts with 'interface' and ends with chr(10).
Each cell will be similar to the following (with 2 to 5 matches per cell):
<text example - multiline in one cell>
!
interface GigabitEthernet0/2.573000
description ***text to describe***
***more router code***
!
interface GigabitEthernet0/2.573099
description ***text to describe***
***more router code***
!
interface GigabitEthernet0/2.573100
description ***text to describe***
***more router code***
</text example>
So, what I would get for the above, would be text in a new column. It would be great if the cell in the new column matched the row it was from/on. So, if the above text was in A1, some other column (say Z) would have the matching extracted lines. As an added bonus, I'd like to stick 'no ' at the beginning of each individual line of every new cell.
If I did that, the final result in the new cell on the same row would be:
<text example - multiline in new cell>
no interface GigabitEthernet0/2.573000
no interface GigabitEthernet0/2.573099
no interface GigabitEthernet0/2.573100
</text example>
From this idea, I will be writing router cleanup scripts based on all kinds of junk I need to clean up in a router once desired data has been copied to a new router (ip routes, prefix lists, etc).
Thank you all!
Bookmarks