0

Can you help me to rework the following regex syntax highlighting in MobaXterm:

enter image description here

I would like the interface type/number (GigabitEthernet0/0/5) to be also in yellow color, not in magenta as in the example.

Here are the codes for both colors as they are now:

Yellow:

[^A-Za-z0-9](policy-map|class|global|logging( event)?|(allocate-)?interface|failover|static|security-level|service(-policy)?|spanning-tree|switchport)[^A-Za-z0-9]

Magenta:

[^A-Za-z0-9]([0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f]|localhost|([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-4])\.[0-9]+\.[0-9]+\.[0-9]+|vlan[0-9]+|([a-z]+thernet|gi)[0-9]+(\/[0-9]+)*)[^A-Za-z0-9]

Thank you in advance!

Ivo Fx
  • 23
  • 9

1 Answers1

0

In case someone need this, here is the solution:

Yellow:

[^A-Za-z0-9](policy-map|class|global|logging( event)?|(allocate-)?interface|failover|static|security-level|service(-policy)?|spanning-tree|switchport|([a-z]+thernet|gi)[0-9]+(/[0-9]+)*)[^A-Za-z0-9]

Magenta:

[^A-Za-z0-9]([0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f](:|-)[0-9a-f][0-9a-f]|localhost|([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-4])\.[0-9]+\.[0-9]+\.[0-9]+|vlan[0-9]*)[^A-Za-z0-9]

From the Magenta code is missing the bold part in the Yellow regex.

Ivo Fx
  • 23
  • 9