Avaya Support Forums  

Go Back   Avaya Support Forums > Avaya Networking Products

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-07-2020, 07:01 PM
rocasi rocasi is offline
Aspiring Member
 
Join Date: Sep 2020
Posts: 1
rocasi has 10 reputation points
Default Regex to filter phone port given serial number

I am trying to create a regular expression that will filter just the section of the port given the last numbers*of the serial number using the command*
Quote:
sh lldp neighbor med inventory
.


I have the following output:

Code:
Port: 1/3 *Index: 48 * * * * * * * * Time: 0 days, 00:02:32
* * * * ChassisId: Network address * *IPv4 *x.x.x.x
* * * * PortId: * *MAC address * * * *00:00:00:00:00:00
* * * * SysName: * xxxxxxxxx
* * * * SysCap: * *TB / B * * * * * * (Supported/Enabled)

*HWRev: 9620D02L * * * * * * * * * * *FWRev: hb96xxua3_1_02_S.bin
*SWRev: ha96xxua3_1_02_S.bin * * * * *SerialNumber: 10FA00001231
*ManufName: Avaya * * * * * * * * * * ModelName: 9620
*AssetID:
-------------------------------------------------------------------------------
Port: 2/5 * Index: 53 * * * * * * * * Time: 0 days, 00:02:32
* * * * ChassisId: Network address * *IPv4 *x.x.x.x
* * * * PortId: * *MAC address * * * *00:00:00:00:00:00
* * * * SysName: * x.x.x.x
* * * * SysCap: * *TB / B * * * * * * (Supported/Enabled)

*HWRev: 9620D02L * * * * * * * * * * *FWRev: hb96xxua3_1_02_S.bin
*SWRev: ha96xxua3_1_02_S.bin * * * * *SerialNumber: 10FA00001234
*ManufName: Avaya * * * * * * * * * * ModelName: 9620
*AssetID:
-------------------------------------------------------------------------------
Port: 3/40 *Index: 54 * * * * * * * * Time: 0 days, 00:02:33
* * * * ChassisId: Network address * *IPv4 *x.x.x.x
* * * * PortId: * *MAC address * * * *00:00:00:00:00:00
* * * * SysName: * x.x.x.x
* * * * SysCap: * *TB / B * * * * * * (Supported/Enabled)

*HWRev: 9620D02L * * * * * * * * * * *FWRev: hb96xxua3_1_02_S.bin
*SWRev: ha96xxua3_1_02_S.bin * * * * *SerialNumber: 10FA00001235
*ManufName: Avaya * * * * * * * * * * ModelName: 9620
*AssetID:
-------------------------------------------------------------------------------
I would like to show the port for the serial number tat ends with 001234. So I would like the following output:

Quote:
Port: 2/5 * Index: 53 * * * * * * * * Time: 0 days, 00:02:32
* * * * ChassisId: Network address * *IPv4 *x.x.x.x
* * * * PortId: * *MAC address * * * *00:00:00:00:00:00
* * * * SysName: * x.x.x.x
* * * * SysCap: * *TB / B * * * * * * (Supported/Enabled)

*HWRev: 9620D02L * * * * * * * * * * *FWRev: hb96xxua3_1_02_S.bin
*SWRev: ha96xxua3_1_02_S.bin * * * * *SerialNumber: 10FA00001234
*ManufName: Avaya * * * * * * * * * * ModelName: 9620
*AssetID:
-------------------------------------------------------------------------------

So far I have tried the following regex expression, but it doesn’t display anything:

/Port.001234/

https://regexr.com/5bfh2

I am trying on ERS 4800 and 4900 switches.

Note: Not sure why it is adding asterisks on here...

Last edited by rocasi; 09-07-2020 at 07:04 PM.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:50 PM.

This Forum is provided solely for the use and convenience of Avaya customers and partners. Use of the Forum is subject to the Terms and Use and Privacy Statement found at www.avaya.com. No other use is permitted. The Forum including all content posted is “AS IS” and Avaya expressly disclaims all warranties and/or guarantees as to its accuracy, reliability, usefulness, quality or non-infringement of intellectual property. Avaya reserves the right to remove any content posted on the Forum at any time and for whatever reason.

Avaya will not be liable for any content posted on this Forum, including, without limitation, any errors or omissions or for any losses or damages of any kind incurred as a result of use or reliance on any content, regardless of its origin.

You expressly understand and agree that you assume all risks associated with use or reliance on this content.