Forum / Remote Desktop Manager - Feature Request

SSH syntax highlighting: support regular expressions

  • Create an Issue
  • Cancel

That would be great if we could input some regex for the keyword of syntax highlighting entries:

image

Clock10 mths

Hello,
I'm not sure if I it's possible but I will add this to our todo.

Regards

David Hervieux

signaturesignature

Clock10 mths

Thanks! smile

Clock10 mths

Are there any available files for import? For instance a file for Cisco CLI devices. One that has already defined the keywords.

Clock6 mths

Not to my knowledge, but if you create one, I'd be keen to test it!

Clock6 mths

Syntax highlighting would be an awesome feature. We currently have a Cisco keyword file that was built around SecureCRT and uses regular expressions.


It would be nice to have similar functionality with regular expressions to easily match dynamic output, such as IP Addresses, MAC addresses and interfaces.

Clock6 mths

Alex Deems wrote:

It would be nice to have similar functionality with regular expressions to easily match dynamic output, such as IP Addresses, MAC addresses and interfaces.

Thanks for chiming in, that's exactly why I requested this feature.

Clock6 mths

Just FYI, I wouldn't be very hopeful for this feature.
I asked this same thing of SecureCRT before we purchased RDM.

Their rationale is that in order to support regular expressions in the outputs, the program (RDM) must first parse the entire output so it can run the expressions against, then present it to the user. This is incredibly resource intensive to try and do real-time.
It would almost certainly slow down command outputs to the point you would notice and think the interface is 'slow' or 'unresponsive'.

Clock6 mths

H K wrote:

Just FYI, I wouldn't be very hopeful for this feature.
I asked this same thing of SecureCRT before we purchased RDM.

Their rationale is that in order to support regular expressions in the outputs, the program (RDM) must first parse the entire output so it can run the expressions against, then present it to the user. This is incredibly resource intensive to try and do real-time.

It would almost certainly slow down command outputs to the point you would notice and think the interface is 'slow' or 'unresponsive'.

I am not sure when you switched to RDM, but I have seen secureCRT support syntax highlighting for years. In fact it was originally released back in 2009 on SecureCRT 6.5.

Clock6 mths

I'm not talking about syntax highlighting the word 'down' as the color red.
I'm talking about regular expressions to distinguish 'down' from 'administratively down' as a phrase.
Or a regular expression to identify a MAC address as xxxx.xxxx.xxxx or xx:xx:xx:xx:xx:xx and highlight it accordingly.

Syntax highlighting, and supporting regular expressions are 2 different things.

Clock6 mths

Yes, SecureCRT has support regular expressions to match syntax highlighting for years. Specifically to your example, I have in a keyword file the following two strings to match mac addresses.


"(?:[a-f0-9]{2}[:-]){5}[a-f0-9]{2}",00408000,00000001
"[a-f0-9]{4}\.[a-f0-9]{4}\.[a-f0-9]{4}",00408000,00000001

I have attached my old keyword file with all of the various regular expressions to do the syntax highlighting. I think you can load the keyword file in a demo of SecureCRT for testing.

Cisco Words.ini
Clock6 mths

interesting. good to know.
Have you noticed the command outputs to be slower then without regex syntax highlighting?
When you do a show run, are the pauses between pressing space bar noticeable while securecrt chew through the outputs?

Clock6 mths

H K wrote:

It would almost certainly slow down command outputs to the point you would notice and think the interface is 'slow' or 'unresponsive'.

Recent text editors / IDE are already doing this at a much larger scale (opening files of thousands/millions of lines with syntax highlighting). Parsing one line and checking against a regex to apply some syntax highlighting isn't going to kill the performances if the code is done right. Plus, I doubt your terminal is outputting thousands of lines per second.

Clock6 mths

H K wrote:

interesting. good to know.
Have you noticed the command outputs to be slower then without regex syntax highlighting?
When you do a show run, are the pauses between pressing space bar noticeable while securecrt chew through the outputs?


There is no noticeable impact to the output of show run, even if you set the terminal length to 0, it outputs just as fast with regex syntax highlighting. If there were thousands of lines per second being outputted then I could see the reasoning behind not performing syntax highlighting because of a performance impact.

Clock6 mths

Alex Deems wrote:

Yes, SecureCRT has support regular expressions to match syntax highlighting for years. Specifically to your example, I have in a keyword file the following two strings to match mac addresses.


"(?:[a-f0-9]{2}[:-]){5}[a-f0-9]{2}",00408000,00000001
"[a-f0-9]{4}\.[a-f0-9]{4}\.[a-f0-9]{4}",00408000,00000001

I have attached my old keyword file with all of the various regular expressions to do the syntax highlighting. I think you can load the keyword file in a demo of SecureCRT for testing.


So I remember now what Van Dyke said was the performance hit.
Regular expressions with spaces. SecureCRT does not support regex with spaces. So you can't do 'admin down' as a single entry.

Clock6 mths

David Hervieux wrote:

Hello,
I'm not sure if I it's possible but I will add this to our todo.

Regards


any updates?

Clock5 mths

Nothing new for now. It's not even planned for RDM 14.

Regards

David Hervieux

signaturesignature

Clock5 mths

Is there anyway to highlight IP addresses through the Syntax Highlighting? I agree it would be great to have Syntax Highlighting support expressions.

Clock5 mths

Ashley Neumeister wrote:

Is there anyway to highlight IP addresses through the Syntax Highlighting?

Unfortunately no.

Clock5 mths

any progress on this?

Clock2 mths

Hello,

We're still working on it but we've had other priorities come up for the terminal. We'll be investing more time into this feature, so hopefully we can have something working soon.

Regards,

Hubert Mireault

signaturesignature

Clock2 mths

Hello,

We've made the change internally. This is planned for RDM 14.1.3.0. You will be able to set an option on each of your syntax highlighting entry if you want it to match by regex or regular matching. This means you can match both if you desire.
Please let us know what you think about the feature once it's available.

Regards,

Hubert Mireault

signaturesignature

Clock9 days

Great news Hubert! I'm eager to test that and highlight all my IP addresses. smile

Thanks a lot for implementing this.

Clock9 days

Hi Hubert,


Thanks for the update and working hard to bring features to the product.

What is the normal update schedule? Could we expect this in a month or 2 or sooner?

Clock4 days

Hello,

We're planning to release 14.1.2.0 next week. For version 14.1.3.0 which will contain the feature, we're planning to release it in 2-3 weeks.

Regards,

Hubert Mireault

signaturesignature

Clock4 days

Thanks Hubert smile

Clock4 days

Thanks that would be awesome. Also please have a add-on to import all global syntax highlight words.

Clock2 days

saumilsdk wrote:

Thanks that would be awesome. Also please have a add-on to import all global syntax highlight words.

You mean like the already existing Import/Export functions?

image

Clock2 days