Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 12-04-2020, 07:23 AM
maciekmacku maciekmacku is offline
Registered User
 
Join Date: Dec 2020
Posts: 2
Arrow Keyword Highlight

Hello,

Is there any option to highlight a word that appears after the specified word? I'm mostly working with Juniper and I would like to highlight zone names that appears after combination "from-zone" and "to-zone" without adding each zone one by one to the Keyword list.

example:

"set security policies from-zone EXAMPLE_1234 to-zone EXAMPLE_4321 policy TEST"
  #2  
Old 12-04-2020, 12:12 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,069
Quote:
Originally Posted by maciekmacku View Post
Is there any option to highlight a word that appears after the specified word? I'm mostly working with Juniper and I would like to highlight zone names that appears after combination "from-zone" and "to-zone" without adding each zone one by one to the Keyword list.

example:

"set security policies from-zone EXAMPLE_1234 to-zone EXAMPLE_4321 policy TEST"
Yes, with regular expression keyword highlighting with sub-string (spaces in regular expressions) support in SecureCRT version 8.7 or newer, you could use pattern that implement a look-behind strategy. As examples (two separate patterns):
(?<=from-zone )\S+
(?<=to-zone )\S+
Notes:
  • In order to use such patterns (patterns which include spaces), you must first ensure that you open Session Options, navigate to the Terminal / Keyword Highlighting / Advanced category and set the the Match style to be: Phrases and substrings
  • Whatever is between the (?<=[/B] and the closing ) will be looked for as a condition for matching, but not included in the actual match.
  • There is a trailing space character following the word "zone" in each pattern above.
  • The \S+ portion of the expression represents "One or more non-whitespace characters"; in other words, it represents the text you want to be highlighted.
--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support
  #3  
Old 12-10-2020, 03:28 AM
maciekmacku maciekmacku is offline
Registered User
 
Join Date: Dec 2020
Posts: 2
thank you Jdev, works like a charm
Closed Thread

Tags
highlight , highlighting , keyword


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 09:14 PM.