PHP uses regular expressions to extract four of columns of data, and to bulk import data into MySQL database
>>>>[0601_Access_S5352]dis arp>>>>IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE>>>>-------------------------------------------------------------------------->>>>192.168.66.11 0016-413e-0c62 SF- GE0/0/23 66>>>>192.168.66.13 0019-b906-e2ec S-- GE0/0/18 66>>>>192.168.66.15 0019-b906-be56 S-- GE0/0/16 66>>>>192.168.66.17 0018-8b1e-96df SF- GE0/0/45 66*
Give a piece of code, want to extract ipaddress,macaddress,interface,vpninstance four data
Writes to the MySQL database, is multi-line,
>>>>insert into ip_interface (ipaddress,macaddress,interface,vpn) values ('192.168.66.11','0016-413e-0c62','GE0/0/23','66');*
Reply content:
PHP uses regular expressions to extract four of columns of data, and to bulk import data into MySQL database
>>>>[0601_Access_S5352]dis arp>>>>IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE>>>>-------------------------------------------------------------------------->>>>192.168.66.11 0016-413e-0c62 SF- GE0/0/23 66>>>>192.168.66.13 0019-b906-e2ec S-- GE0/0/18 66>>>>192.168.66.15 0019-b906-be56 S-- GE0/0/16 66>>>>192.168.66.17 0018-8b1e-96df SF- GE0/0/45 66*
Give a piece of code, want to extract ipaddress,macaddress,interface,vpninstance four data
Writes to the MySQL database, is multi-line,
>>>>insert into ip_interface (ipaddress,macaddress,interface,vpn) values ('192.168.66.11','0016-413e-0c62','GE0/0/23','66');*