<div dir="ltr">Hello All,<div><br></div><div>I've been lurking around the mailing list trying to find a solution to my issue. I'm trying to grab configuration from a Cisco ASR5000 which contains the configuration in the form of:</div>
<div><br></div><div>spi remote-address 192.168.3.50 spi-number 256 encrypted secret ba8533de9d50051d04c124ccebb16563 description "REMOTE-1" </div><div><br></div><div style>Regex is not one of my forte's , and so far I've got the following to remove the encrypted key from the configuration which doesn't seem to be working</div>
<div style><br></div><div style><div> if (/(\s+spi remote-address (.*) spi-number (.*) encrypted secret .* description .* )/ && $filter_pwds >= 1) {</div><div> ProcessHistory("ADMIN","","","#spi remote-address $1 spi-number $2 encrypted secret <removed> description $4 $5\n");</div>
<div> next;</div><div> }</div><div><br></div><div style>the result that I get in the configuration looks like:</div><div style><br></div><div style>#spi remote-address spi remote-address 192.168.3.50 spi-number 256 encrypted secret ba8533de9d50051d04c124ccebb16563 description "REMOTE-1" spi-number encrypted secret <removed> description <br>
</div><div style><br></div><div style>i'm pretty sure i'm missing something in regex. If someone could point me in the right direction, I would really appreciate it. </div><div style><br></div><div style>Thank you in advance!</div>
<div style><br></div><div style><br></div></div></div>