петък, февруари 10, 2012

Notepad++ Seek&Replace

Convert list of IP addresses to valid IOS ACL with Notepad++
0. Start with:
1.1.1.1
2.2.2.2
3.3.3.3
...........
1. Open IPaddr.txt with Notepad++
2. CTRL+R; radiobutton Regular expression ON
Find what: ^(.*)$ 
Replace with: deny ip host
Hit Replace All
3. radiobutton Extended (\n,\r,\t) ON

Find what: \n
Replace with: \any
 Hit Replace All
4. Finish at
deny ip host 1.1.1.1 any
deny ip host 2.2.2.2 any
deny ip host 3.3.3.3 any
...........

Няма коментари: