Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2016, 01:34 PM
clay584 clay584 is offline
Registered User
 
Join Date: Apr 2013
Posts: 2
Keyword Highlighting Issues

First, I want to say that I have created a bug report and a feature request for these items. I want to see what the other users think about this. Please reply with a +1 if you agree.

Issue #1:
Syntax highlighting (regex) does not allow \s or literal spaces. This is a bug. It has been here since 7.3 when the feature was released, and it remains in 8.0 beta release. This really needs to be fixed.

Issue #2:
A great syntax highlighting feature would be that if you could match a line and only colorize a substring of that line with a particular color.

For example:

network 10.0.0.0 0.0.0.255 area 0

regex: ^network\s+(\d+\.\d+\.\d+\.\d+)\s(\d+\.\d+\.\d+\.\d+) area \d+

This would match the whole line, but then you pick one color for the first capture group, and pick another color for the second capture group.

network 10.0.0.0 0.0.0.255 area 0
Reply With Quote
  #2  
Old 02-15-2016, 08:14 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hi clay584,

As explained in the email, the current implementation of SecureCRT's keyword highlighting support is by design. It is keyword highlighting after all, not phrase or sentence highlighting. When supporting spaces was tested, thus phrases or sentences, performance was severely impacted.

I have added this thread to a feature request in our product enhancement database to support substring and phrase matches in keyword highlighting (regex with spaces). Of course it's contingent on the prior one being implemented, but I have also created a feature request for the ability to match an entire phrase, but colorize only a substring.

Should a future release of SecureCRT include either feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include "Feature Request - Forum Thread #12250" in the subject line or use this form from the support page of our website.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 02-17-2016, 10:16 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hi all,

Just to update the thread with the latest, SecureCRT's product director has provided this additional information about why only "keyword" highlighting is supported at this time, not "phrases or substrings" (words with spaces).

Quote:
A while back, we investigated adding support for highlighting phrases and the performance hit was significant. We don't have a timeline for implementing this feature because we will need to do some more investigation to determine if this can be implemented in a way that is practical.
Posted February 17, 2016.

SecureCRT v7.3.6 is the official release.

SecureCRT v8.0 is in beta release.

This URL allows users to check their SecureCRT upgrade eligibility.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #4  
Old 02-17-2016, 03:35 PM
Casey Casey is offline
Registered User
 
Join Date: Oct 2011
Posts: 114
Quote:
Originally Posted by clay584 View Post

For example:

network 10.0.0.0 0.0.0.255 area 0

regex: ^network\s+(\d+\.\d+\.\d+\.\d+)\s(\d+\.\d+\.\d+\.\d+) area \d+

This would match the whole line, but then you pick one color for the first capture group, and pick another color for the second capture group.

network 10.0.0.0 0.0.0.255 area 0
For this limited example, I'd use a regex string to match IPs and a different one to match subnet/wildcard masks.

This is from my 'cisco words' keyword file I shared a while back:

For Subnet/Wildcards: (?:)(?:0|255)\.(?:[0-9]{1,3}\.){2}[0-9]{1,3}

For IPs: (?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/[0-9]{1,2}|:[0-9]+|\W)?(?:\x20|$)

It's not perfect (IE: the first octect must be either '0' or '255' for it to match the mask properly), however it works 'good enough' in most cases and is more robust than matching a single OSPF config line.

Hope it helps,
CB
Reply With Quote
Reply

Tags
highlight , regex , syntax

Thread Tools
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 -6. The time now is 06:09 AM.